open ADO

RAYMOND HJ
10-09-2000, 08:16 PM
Hello everybody..
Please help me how to solve this problem..

I got runtime error : "Can't start your application. The workgroup information file is missing or opened exclusively by another user."

my code as below:

sub form_load()
dim cnBiblio as connection
dim rs as recordset

set cnBiblio = new connection
set rs = new recordset

with cnBiblio
.Provider = "Microsoft.Jet.OLEDB.3.51"
.ConnectionString = "User ID=sa;" & _
.Data = Source=MSERIES;" & _
.Initial Catalog = BIBLIO.MDB"
.open
end with

rs.open "SELECT Title FROM TITLES",cnBiblio

End sub

Thank you...

makai
10-10-2000, 02:23 AM
you need to declare ADODB. conn & rs
then your connection string is messed up


Sub form_load()
Dim cnBiblio As ADODB.Connection
Dim rs As ADODB.Recordset

Set cnBiblio = New ADODB.Connection
Set rs = New ADODB.Recordset

With cnBiblio
.ConnectionString = _
"Provider=Microsoft.Jet.OLEDB.3.51;" & _
"Data Source=BIBLIO.mdb"
.Open
End With

rs.Open "SELECT Title FROM TITLES", cnBiblio
End Sub

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum