0% found this document useful (0 votes)
12 views4 pages

SQL Data Connection and Commands

Hi Iam Khalid Husain ali Ahmed Now iam Working In asiancerc Information technology (ranbaxy Group) as .NET Developer During 2Years Mobile no. 9833984451

Uploaded by

khalid.husain
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views4 pages

SQL Data Connection and Commands

Hi Iam Khalid Husain ali Ahmed Now iam Working In asiancerc Information technology (ranbaxy Group) as .NET Developer During 2Years Mobile no. 9833984451

Uploaded by

khalid.husain
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

Dim myconnection As New SqlClient.

SqlConnection
Dim mycmd As New [Link]
Dim mycmd1 As New [Link]
Dim mycmd2 As New [Link]
Dim mycmd3 As New [Link]
Dim mycmd4 As New [Link]
Dim mycmd5 As New [Link]

Dim myDs As New DataSet


Dim myDs1 As New DataSet
Dim myDs2 As New DataSet
Dim myDs3 As New DataSet
Dim myDs4 As New DataSet
Dim myDs5 As New DataSet

Dim myda As New [Link]


Dim myda1 As New [Link]
Dim myda2 As New [Link]
Dim myda3 As New [Link]
Dim myda4 As New [Link]
Dim myda5 As New [Link]

' [Link] =
"server=[Link];database=power_view;uid=sa;pwd=db2admin"
[Link] =
"server=[Link];database=power_view;uid=sa;pwd=db2admin"

[Link] = myconnection
[Link] = myconnection
[Link] = myconnection
[Link] = myconnection
[Link] = myconnection
[Link] = myconnection

[Link] = [Link]
[Link] = [Link]
[Link] = [Link]
[Link] = [Link]
[Link] = [Link]
[Link] = [Link]

[Link] = "getprice_cash_fut_opt"
[Link]("@Userid", [Link]).Value = guserid
[Link] = "getindicesprice"
[Link] = "GetTotal_figurevalue_nse"
[Link]("@Userid", [Link]).Value = guserid
[Link] = "GetTotal_figurevalue_bse"
[Link]("@Userid", [Link]).Value = guserid
[Link] = "GetTotal_figurevalue_fonse"
[Link]("@Userid", [Link]).Value = guserid
[Link] = "GetTotal_figurevalue_option"
[Link]("@Userid", [Link]).Value = guserid

[Link] = mycmd
[Link] = mycmd1
[Link] = mycmd2
[Link] = mycmd3
[Link] = mycmd4
[Link] = mycmd5

[Link](myDs, "Existing MartkeWatch")


[Link](myDs1)
[Link](myDs2)
[Link](myDs3)
[Link](myDs4)
[Link](myDs5)

Txbox_totinvest.Text = [Link](0).Rows(0).Item(0)
Txbox_Currentval.Text = [Link](0).Rows(0).Item(1)
Txbx_PL.Text = [Link](0).Rows(0).Item(2)
[Link] = [Link](0).Rows(0).Item(3)

NSE_TOTAL_Invest.Text = [Link](0).Rows(0).Item(0)
NSE_Current_val.Text = [Link](0).Rows(0).Item(1)
NSE_pl.Text = [Link](0).Rows(0).Item(2)
NSE_perc.Text = [Link](0).Rows(0).Item(3)

FO_TOTAL_Invet.Text = [Link](0).Rows(0).Item(0)
Fo_current_val.Text = [Link](0).Rows(0).Item(1)
fo_pl.Text = [Link](0).Rows(0).Item(2)
fo_percent.Text = [Link](0).Rows(0).Item(3)

OPT_TOTAL_INVEST.Text = [Link](0).Rows(0).Item(0)
OPT_CURRENT_VAL.Text = [Link](0).Rows(0).Item(1)
OPT_PL.Text = [Link](0).Rows(0).Item(2)
OPT_PERC.Text = [Link](0).Rows(0).Item(3)

' [Link] = myDs


Dim ts As New DataGridTableStyle
[Link] = [Link](0).TableName

[Link] = [Link](0)
[Link] = [Link](0)
[Link] = "t1"

[Link]()
[Link]()
[Link]()

If [Link](0).Rows(0).Item(0) < [Link](0).Rows(0).Item(1) Then


[Link] = True
ElseIf [Link](0).Rows(0).Item(0) > [Link](0).Rows(0).Item(1)
Then
[Link] = True
Else
[Link] = True
End If

If [Link](0).Rows(0).Item(0) < [Link](0).Rows(0).Item(1) Then


bse_pic_up.Visible = True
ElseIf [Link](0).Rows(0).Item(0) > [Link](0).Rows(0).Item(1)
Then
bse_pic_down.Visible = True
Else
bse_pic_same.Visible = True
End If

If [Link](0).Rows(0).Item(0) < [Link](0).Rows(0).Item(1) Then


fo_pic_up.Visible = True
ElseIf [Link](0).Rows(0).Item(0) > [Link](0).Rows(0).Item(1)
Then
fo_pic_down.Visible = True
Else
fo_pic_same.Visible = True
End If

If [Link](0).Rows(0).Item(0) < [Link](0).Rows(0).Item(1) Then


opt_up.Visible = True
ElseIf [Link](0).Rows(0).Item(0) > [Link](0).Rows(0).Item(1)
Then
opt_down.Visible = True
Else
opt_same.Visible = True
End If

If CLng(Txbox_totinvest.Text) < CLng(Txbox_Currentval.Text) Then


Txbx_PL.ForeColor = [Link]
[Link] = [Link]

Else
Txbx_PL.ForeColor = [Link]
[Link] = [Link]

End If

If CLng(NSE_TOTAL_Invest.Text) < CLng(NSE_Current_val.Text) Then


NSE_pl.ForeColor = [Link]
NSE_perc.ForeColor = [Link]

Else
NSE_pl.ForeColor = [Link]
NSE_perc.ForeColor = [Link]

End If

If CLng(FO_TOTAL_Invet.Text) < CLng(Fo_current_val.Text) Then


fo_pl.ForeColor = [Link]
fo_percent.ForeColor = [Link]

Else
fo_pl.ForeColor = [Link]
fo_percent.ForeColor = [Link]
End If

If CLng(OPT_TOTAL_INVEST.Text) < CLng(OPT_CURRENT_VAL.Text) Then


OPT_PL.ForeColor = [Link]
OPT_PERC.ForeColor = [Link]

Else
OPT_PL.ForeColor = [Link]
OPT_PERC.ForeColor = [Link]
End If

txbx_total_invest.Text = [Link](0).Rows(0).Item(0) +
[Link](0).Rows(0).Item(0) + [Link](0).Rows(0).Item(0) +
[Link](0).Rows(0).Item(0)
txbx_current_val.Text = [Link](0).Rows(0).Item(1) +
[Link](0).Rows(0).Item(1) + [Link](0).Rows(0).Item(1) +
[Link](0).Rows(0).Item(1)
txbx_gross_pl.Text = txbx_current_val.Text - txbx_total_invest.Text
txbx_perc.Text = CInt(100 * txbx_gross_pl.Text / txbx_total_invest.Text)
'txbx_TODAY_pl.Text =[Link](0).Rows.C
Dim ii As Integer
Dim jj As Integer
jj = 0
For ii = 0 To [Link](0).[Link] - 1
jj = [Link](0).Rows(ii).Item("TodayPL") + jj
Next
txbx_TODAY_pl.Text = jj
txbx_TODAY_perc.Text = CInt(100 * jj / txbx_total_invest.Text)

If txbx_total_invest.Text < txbx_current_val.Text Then


txbx_gross_pl.ForeColor = [Link]
txbx_perc.ForeColor = [Link]
Else
txbx_gross_pl.ForeColor = [Link]
txbx_perc.ForeColor = [Link]
End If

If txbx_total_invest.Text < txbx_current_val.Text Then


gross_pic_up.Visible = True
ElseIf txbx_total_invest.Text > txbx_current_val.Text Then
gross_pic_down.Visible = True
Else
gross_pic_same.Visible = True

End If

Try
Dim t As Type = [Link]
Dim m As [Link] = [Link]("ColAutoResize",
[Link] Or [Link])

Dim i As Integer = [Link]


Dim j As Integer = [Link]
Do While i < j
[Link](dg1, New Object() {i})
i = i + 1
Loop

Catch ex As Exception
[Link]("Failed to resize column: " + [Link] + vbCrLf)
End Try

You might also like