Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VB and Oracle
Message
From
24/02/1999 07:50:56
 
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Title:
Miscellaneous
Thread ID:
00188766
Message ID:
00190879
Views:
19
There are many ways you can access data on oracle. Microsoft wants people to use ADO. Since you are using VB5 you will probably need to download and install the latest OleDB drivers from the Microsoft download page. Then create a DSN to Oracle. Your code will look something like this.

set a reference to the activex data object library 2.0

dim conn as adodb.connection
dim rs as adodb.recordset

set conn = createobject(adodb.connection)
conn.open "DSN name", "OracleUserName", "PassWord"
set rs = createobject(adodb.connection)
rs.open "select * from Table", conn, adopenkeyset, adlockoptimistic


Good Luck,

Michael




>I have an assignment in my Oracle class that requires that I use VB. I have installed VB5 Enterprise, and I am not sure how to go about connecting to the Oracle database. I've created a DSN to Oracle and connected to it. I have tried to install the data components, but it seems that they don't have an odbc component for oracle. Do i have to hard code the db connection? How would this be accomplished?
Previous
Reply
Map
View

Click here to load this message in the networking platform