U
UJ
I have a web form that I am simply dispaying the value(column) from a dataset into a textbox.
Here is the code In the page load event
cmd.Connection = cn
da.SelectCommand = cmd
cmd.CommandText = "Select bhdescription,bhid " & _
"from tBehaviorsTypes " & _
"order by bhid; "
da.Fill(dsBT, "dsBhTypes")
cn.Close()
X = 0
Me.lblBehavior.Text = dsBT.Tables("dsBhTypes").Rows(X).Item"bhDescription").ToString
data adaper, data set, connection and command object are declared as follows
Public ds As New DataSet
Public dsBT As New DataSet
Public cn As New Data.SqlClient.SqlConnection(ConfigurationManager.AppSettings.Get("mCnn"))
Public da As New SqlClient.SqlDataAdapter
Public cmd As New SqlClient.SqlCommand
X is declared as a public in a public module
Everything in the page load appears to work
I've tried running this as a project running on localhost and a website on from the IIS server and get same results.
Any ideas? Thanks!!!!!
The form has a next button which excutes the following code:
X = X + 1
Me.lblBehavior.Text = dsBT.Tables("dsBhTypes").Rows(X).Item("bhDescription").ToString
Me.TextBox1.Text = X.ToString
my problem is that x only increments the first time the next button is clicked not incrementing.
--------------= Posted using GrabIt =----------------
------= Binary Usenet downloading made easy =---------
-= Get GrabIt for free from http://www.shemes.com/ =-
Here is the code In the page load event
cmd.Connection = cn
da.SelectCommand = cmd
cmd.CommandText = "Select bhdescription,bhid " & _
"from tBehaviorsTypes " & _
"order by bhid; "
da.Fill(dsBT, "dsBhTypes")
cn.Close()
X = 0
Me.lblBehavior.Text = dsBT.Tables("dsBhTypes").Rows(X).Item"bhDescription").ToString
data adaper, data set, connection and command object are declared as follows
Public ds As New DataSet
Public dsBT As New DataSet
Public cn As New Data.SqlClient.SqlConnection(ConfigurationManager.AppSettings.Get("mCnn"))
Public da As New SqlClient.SqlDataAdapter
Public cmd As New SqlClient.SqlCommand
X is declared as a public in a public module
Everything in the page load appears to work
I've tried running this as a project running on localhost and a website on from the IIS server and get same results.
Any ideas? Thanks!!!!!
The form has a next button which excutes the following code:
X = X + 1
Me.lblBehavior.Text = dsBT.Tables("dsBhTypes").Rows(X).Item("bhDescription").ToString
Me.TextBox1.Text = X.ToString
my problem is that x only increments the first time the next button is clicked not incrementing.
--------------= Posted using GrabIt =----------------
------= Binary Usenet downloading made easy =---------
-= Get GrabIt for free from http://www.shemes.com/ =-