|
-
July 22nd, 2009, 05:57 AM
#1
fill form fields
I am working on Visualbasic -2008 express edition and mysql as database.I am able to establish the connection with database table.I am strucked in how to fill the form fields and datgrid..I have date,partno,quotes,customer fields on a form.Have a look at the connection
help me to fill the form fields and datagrid
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
cn = New ADODB.Connection
rs = New ADODB.Recordset
cn.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};" + "SERVER=localhost;" + "DATABASE=in_out;" + "UID=root;" + "PASSWORD=pacvision;" + "dsn=in_out:" + "OPTION=3;"
'cn.ConnectionString = Cnstr
cn.Open()
MessageBox.Show("Connection Opened Successfully")
rs.Open("Select * from deptno", cn.ConnectionString, ADODB.CursorTypeEnum.adOpenKeyset, ADODB.LockTypeEnum.adLockOptimistic)
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
|