Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to open the Data file one time ?
Message
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Divers
Thread ID:
00362527
Message ID:
00365488
Vues:
60
>>Yes.. but the problem solved when i made a data link connection.
>>but now it is giving error on the .Open line as follow:
>>
>>Public Sub main()
>> 'This will open a global connection
>> Set gobjconn = New ADODB.connectoin
>> With gobjconn
>> ' Change the data source properth in the following time
>> .ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\mysystems\res\res-test.mdb;Persist Security Info=False"
>> .Open <<<<==========
>> End With
>>
>> ' Now that the connection is open, display the application
>> Form1.Show
>>
>>Error Expr.
>>Runtime error 3709
>>the application requested an operation on an object with reference to a closed or invaled connection object.
>
>Is this a copy-and-paste from your application? If so, you have a serious typo error:
Set gobjconn = New ADODB.connectoin
>Should read
Set gobjconn = New ADODB.connection
>
>Also, you may want to try to set your provider to "Provider=Microsoft.Jet.OLEDB.3.51;"

Do you beleve it, i checked the code for more than 100 times !!!! :))))
no it is not copy-past, i retyped it tring understand the code to wrote...
this is a common problem we face it to much in the developing time, and somtimes we spend days to find out a problem while it is in front of us but we dont see it. :)

- why to use 3.51 insted of 4.0.?

- do i have to type the ubove code in each form i open, and what is the best way to refere
each txtbox in the form to the correct field in the table.

Many thanks to you...
<><><><><><><><><><><><><><><><><><><><>
<><> REMEMBER,,,,KNOWLEDGE IS POWER <><>
<><><><><><><><><><><><><><><><><><><><>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform