Help with accessing database?

RPBLEA

Active member
Joined
Apr 26, 2005
Messages
36
Programming Experience
1-3
OKay I want to read the database into some text boxes, each row going into a different text box, Can' t figure out how to do this for the life of me, Here's some t hing that I found on google but am having no luck what so ever, beeen stuck on it for 3 hours now, any Input appreciated, thanks, this is what I have so far, but it doesn't work, don't know what's wrong

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim conn As New SqlConnection(ConfigurationSettings.AppSettings("strDBConn"))

Dim dsData As DataSet

Dim dvPairView As New DataView

Dim dvPairsView As New DataView

dsData =
CType(Session("DataSet"), DataSet)

With dvPairView

.Table = dsData.Tables("pairs")

End With

txtorderkey.Text = dvPairView(0).Item("orderkey").ToString()

txtbuilding.Text = dvPairView(0).Item("building").ToString()

txtroom.Text = dvPairView(0).Item("room").ToString()

txtpanel.Text = dvPairView(0).Item("panel").ToString()

txtprefix.Text = dvPairView(0).Item("prefix").ToString()

txtextension.Text = dvPairView(0).Item("ext").ToString()

txtcablepair.Text = dvPairView(0).Item("cablepair").ToString()

txtvgname.Text = dvPairView(0).Item("vgname").ToString()

txtport.Text = dvPairView(0).Item("port").ToString()

txtdescription.Text = dvPairView(0).Item("descr").ToString()

txtlocation.Text = dvPairView(0).Item("location").ToString()

txtjackdesi.Text = dvPairView(0).Item("jackdesi").ToString()

txtnotes.Text = dvPairView(0).Item("notes").ToString()

txtupdated.Text = dvPairView(0).Item("updated").ToString()

 
Top Bottom