Help

Help

Post by Jake » Sun, 13 Jul 2003 00:38:29



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.

 
 
 

Help

Post by Josías Galván Reye » Sun, 13 Jul 2003 02:04:29


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"

 
 
 

1. help,help,help,help,help,help,help,help,help,help,help,help,help,

Hi,
I have a small problem, and if you know the answer I would really be
thankful for your help.
I have an access database which is called "Client.mdb"
on a form, I displayed a dbcombox for the costumer's name
a textbox for the address
a textbox for the city
a textbox for the state
and a textbox for the zipcode

on all my textboxes and the dbcombobox I have set their Datasource and
Datafield properties to Data1,
when I run the program the information on the first record of the data shows
on the form,

but what I need to do is, when I change the costumer's name on the
dbcombobox (which displays all of the costumer's names on it) I want the
textboxes to show the address, city, state, and zipcode of the costumer I
have choosen,

Thank you in advance,
Enrique G Lugo

2. Another replication issue.

3. Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,

4. RTF printer driver?

5. help help help help help help help help help

6. Transaction log growth

7. SQL To ORACLE Help Help Help Help Help

8. best approach an sp? if so, how? newbie

9. query:HELP! HELP HELP HELP HELP

10. HELP HELP HELP HELP

11. HELP HELP HELP HELP!

12. Help help help help

13. SQL Mail Help Help Help !!!!