By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,084 Members | 1,956 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,084 IT Pros & Developers. It's quick & easy.

linking database(access) to vb6

P: 1
hi guys!! i'm a newbie here and hope you could help me out with my dilemma..
i have a database and now i want to link it with VB6..i don't know how to start it..some are telling me about connection strings, ADO and OLE DB,.the program seems to be simple, yet i don't know how to do it..i'm just with VB..

the program should provide all the specifications of the conductor <coming form the database> being input by the user.

hope you could help me..thanks!!
Sep 19 '07 #1
Share this Question
Share on Google+
1 Reply


P: 8
hi guys!! i'm a newbie here and hope you could help me out with my dilemma..
i have a database and now i want to link it with VB6..i don't know how to start it..some are telling me about connection strings, ADO and OLE DB,.the program seems to be simple, yet i don't know how to do it..i'm just with VB..

the program should provide all the specifications of the conductor <coming form the database> being input by the user.

hope you could help me..thanks!!
I had the same problem when I started
first from the Project Menu Select Componints
Check the checkbox with the "Microsoft ADO Data Control"
Drag the control to your form
Steps 1
You Could:
-Go to it's "Connection String" Property and Follow The Steps Thrue
-After doing so you can bind controls to the controler
Steps 2
Or you Could:
-in a Module or MDI Form Declare Public The Following
Public cnn As New ADODB.Connection
Public rcs1 As New ADODB.Recordset

then your connection and Statements are in SQL format all the way from there

cnn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\database.mdb"
cnn.Open
cnn.CursorLocation = adUseClient
-database.mdb - is the name of your database
and statements like

rcs1.Open"Select * From [Tabel]",cnn, adOpenDynamic, adLockOptimistic
-Tabel - Tabel Within You Database
-cnn - Refering To Your connection string
-adOpenDynamic,adLockOptimistic - Operator(optionan)
Sep 19 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.