VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Connect to a database using code

by John Ervine Gempesaw (1 Submission)
Category: Databases/Data Access/DAO/ADO
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Mon 3rd March 2008
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Connect to a database using code

API Declarations


Dim rec as Adodb.Recordset
Public Sub StartCon()
Set con = New Adodb.Connection
con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=database.mdb"
'The database file must be in the same path as the application

Rate Connect to a database using code



StartCon
End Sub

Download this snippet    Add to My Saved Code

Connect to a database using code Comments

No comments have been posted about Connect to a database using code. Why not be the first to post a comment about Connect to a database using code.

Post your comment

Subject:
Message:
0/1000 characters