VB 6.0 - Public CN As New ADODB.Connection Public Sub attendconn() CN.Connectio

Asked By Sylvester Sorbito on 17-Oct-11 08:53 AM
hello can you please help for debugging this error in my system.....

when i am trying to open other form this will the error to debug....

Public CN As New ADODB.Connection
Public Sub attendconn()
CN.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source= " & App.Path & "\adminsystem.mdb"
CN.Open



tnx


Jitendra Faye replied to Sylvester Sorbito on 17-Oct-11 09:30 AM
say your access file name is myaccess.mdb,

You will access it in such a way:


Set rec = New ADODB.Recordset
Set conn = New ADODB.Connection
connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & "myaccess.mdb" & ";Persist Security Info=False"
conn.Open (connstr
)

try this and let me know.