VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



ADO Connection using app.path this connection was effective 100%

by Dante Mercado (3 Submissions)
Category: Databases/Data Access/DAO/ADO
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 3rd July 2009
Date Added: Mon 8th February 2021
Rating: (1 Votes)

ADO Connection using app.path this connection was effective 100%

API Declarations


Dim con As New ADODB.Connection
Dim rec As New ADODB.Recordset

Rate ADO Connection using app.path this connection was effective 100%



'2. save it to one folder
'3. open vb aplication
'4. create a declaration same as declaration obve
'5. create a connection
'6. before you run the program save first the whole project in the folder where you save the database.
'7. then run the application
'8. finish
'9. hope you like it


Private Sub Form_Load()
Set con = New ADODB.Connection
con.CursorLocation = adUseClient
con.Open "provider=microsoft.jet.oledb.4.0;persist security info=false;data source=" & App.Path & "\db1.mdb"
MsgBox "database connected"
End Sub


Download this snippet    Add to My Saved Code

ADO Connection using app.path this connection was effective 100% Comments

No comments have been posted about ADO Connection using app.path this connection was effective 100%. Why not be the first to post a comment about ADO Connection using app.path this connection was effective 100%.

Post your comment

Subject:
Message:
0/1000 characters