Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting connected to a database from vb3

Status
Not open for further replies.

JoseJAranjanil

Programmer
Mar 29, 2006
1
IN
I'm new to vb3 environment.Please help me how to go for a database connection in vb3.I cannot find a data control in the tool box.Please help me in getting additional component in toolbox...
 
There is a data control in VB3; look on your Toolbar. However...

For most work, you'll need to connect to your database using ODBC and DAO. Furthermore, the 16 bit ODBC can't connect to newer databases, so you might need to migrate to VB 5 or 6.

Pat O'Connell
Visualize Whirled Peas
 
For an Access db, you do something like

Set db = OpenDatabase(app.Path & "\dbStud.mdb", False, False)

and then to read data something like

csql = "SELECT * FROM PassWords "
Set rs1 = db.CreateSnapshot(csql)
If Not (rs1.BOF And rs1.EOF) Then

and so on.

Does that help?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top