Hello Jake
create a database with a "big" instance of Access, is not a recommended
practice, instead use ADOX, something like this:
Dim cnnString As String
cnnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\1.mdb;"
'Crea la base de datos...
Dim cat As New ADOX.Catalog
cat.Create cnnString
'then add tables...
Dim tbl As ADOX.Table
Set tbl = New ADOX.Table
tbl.Name = "Address"
tbl.Columns.Append "Name", adVarChar, 50
tbl.Columns.Append "Phone", adDouble
cat.Tables.Append tbl
'close all...
Set tbl = Nothing
Set cat = Nothing
'and now you can work with the database...
Dim cnn As New ADODB.Connection
cnn.Open cnnString
and... about the error, verify destroy (close object) access instance
before add data... Access may open the database exclusive
Sguindaw
> Hi there
> Does anybody know how to stop the error: "Could not use ''; file already in
> use" from occurring. My application uses an instance of Access to create a
> database and add tables and fields. However when I try an create a ADO
> connection to add data to the tables it crashes with the above error.
--
Sguindaw -> "gesteo onis: hacer que las cosas sean"