VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Opening a MS-Access Database 7.0(MDB) very easy. by Noel M. Resende

by Bill Desing (1 Submission)
Category: Databases/Data Access/DAO/ADO
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 31st July 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Opening a MS-Access Database 7.0(MDB) very easy. by Noel M. Resende

API Declarations


dim db as database
dim rs as recordset
dim sqlcommand as string
dim path as string
dim file as string

Rate Opening a MS-Access Database 7.0(MDB) very easy. by Noel M. Resende



Set rs = db.OpenRecordset(STRVALUE)
End Function

Private sub Form_Load()
path = "c:\vg\database\" 'put your database path here
file = "geral.mdb" ' Access database file
Set db = OpenDatabase(path+file) 'open database
sqlcommand = "select * from customers where id=300" 'define the Sql command
Query(sqlcommand) ' execute the sql command
msgbox rs!customer_name 'show a field
End Sub

Download this snippet    Add to My Saved Code

Opening a MS-Access Database 7.0(MDB) very easy. by Noel M. Resende Comments

No comments have been posted about Opening a MS-Access Database 7.0(MDB) very easy. by Noel M. Resende. Why not be the first to post a comment about Opening a MS-Access Database 7.0(MDB) very easy. by Noel M. Resende.

Post your comment

Subject:
Message:
0/1000 characters