• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 59
  • Last Modified:

asp.net/vb.net using databases programmatically

Hi - I'm new to asp.net, using VB.net.   I've gone through the basics of all these nice web controls, specifically to automate the pulling and displaying of data from databases using gridviews, etc.

However, I'm struggling to find a good tutorial of how to access, pull and manage data from a sql database using vb code, etc. not using these fancy web controls, but using code.


Can you recommend a link or two to tutorials that i can work from to understand how to have this greater level of control.

Thanks,
0
ErinTheCoderGirl
Asked:
ErinTheCoderGirl
  • 2
  • 2
2 Solutions
 
ErinTheCoderGirlAuthor Commented:
Hi - thanks but these both populate a gridview... is there a way to retrieve data from the database, and directly populate textboxes, etc.?
0
 
CodeCruiserCommented:
Here is a simple example

Dim Conn As New SqlConnection(Connection_String)
Dim Comm1 As New SqlCommand(Command, Conn)
Conn.Open()
Dim DR1 As SqlDataReader = Comm1.ExecuteReader()
If DR1.Read() Then
	textBox.Text = DR1.GetValue(0).ToString()
End If
Conn.Close()

Open in new window

0
 
ErinTheCoderGirlAuthor Commented:
Hi, thanks for the example, but I am looking for tutorialson this.

Do you know of any tutorials that guide through programmatic database controls?
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now