|
-
Nov 23rd, 2005, 03:09 PM
#1
Thread Starter
Junior Member
Filling in TextBox values from a database
Hey guys, I am kind of new to VB.NET programming. Right now I am trying to fill in a textbox field with a value from an access database. The error I am getting is that the values are not of the same type. Do I need to do some converting before I can fill in the values? Below is my code. Thank you!!!
Dim recset2
Dim sqlstament2
Dim Conn2
recset2 = CreateObject("ADODB.Recordset")
Conn2 = CreateObject("ADODB.Connection")
Conn2.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=C:\test.mdb")
sqlstament2 = "SELECT name FROM testing"
recset2.Open(sqlstament2, Conn2, 1, 3)
namevalue = recset2.fields("name")
phonevalue = recset2.fields("phone")
useridvalue = recset2.fields("userid")
followupvalue = recset2.fields("followup")
problemvalue = recset2.fields("problem")
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|