How to create database in & connect MS-ACCESS with VISUAL BASIC?
how to create database in Ms-Access & how to connect that database with
Visual Basic-6.0, if i work in standalone system? Kindly let me know the details??
how to create database in Ms-Access & how to connect that database with
Visual Basic-6.0, if i work in standalone system? Kindly let me know the details??
Hope this piece of code will help you to get started.
Dim Ageconn As New ADODB.Connectio n
Dim Ageset As New ADODB.Recordset
Private Sub Form_Load()
Ageconn.Connect ionString = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=D:\MyDB. mdb;Persist Security Info=False"
Ageconn.Open
If Ageconn.State <> adStateOpen Then
MsgBox "Error...!! ! Connection not Open", vbCritical, "Connectivi ty Problem"
End If
Ageset.ActiveCo nnection = Ageconn
Ageset.CursorLo cation = adUseClient
Ageset.CursorTy pe = adOpenDynamic
Ageset.LockType = adLockOptimisti c
Ageset.Source = "select * from MyTable"
Ageset.Open
Comment