an error occured in connecting vb 6.0 to msaccess 2003
Dear Sir ,
i have earlier connected vb 6.0 to ms acess 2003 via code in button
'
private sub save_click()
Const strconnection as string = "provider = Microsoft.Jet.OLEDB.4.0;data source = c:\documents\db1.mdb; persist security info = false"
dim cnn as new adodb.connection
dim cmd as new adodb.command
cnn.connection string = str connection
cnn.open
but this code is giving error as compile error as defined cnn as invalid
please do needfull
Regards
Satish.S
Re: an error occured in connecting vb 6.0 to msaccess 2003
Hi,please check if you have appropriate reference to ADODB library (Tools-.References->Microsoft ActiveX data Object ...) ?