Can someone please provide me detailed instructions on how I can connect Visual Basic 6.0 Professional to Oracle 8.1.5 (which is on a server) using the Oracle Driver (not Microsoft ODBC Driver)?
Do I need a DSN and TSN?
What is the VB code that I use and where would I place it in my VB Project?
What references/libraries do I need--how would I add them to the project?
How can I send a SQL queries and retrieve results from the Oracle server?
As you can tell, this is my first time doing this...please help. I would greatly appreciate it. Thanks.
It depends on which Object u r using for data access.
Normally its ADO.
first u have to declare a ADODB connection object and set the connection string like
con.CONNECTString = 'DSN=<<name of dsn>> uid=<<oracle user>> pwd = <<password>>'
This is the method using DSN, also u can use the Service Provider.
For Getting data from Oracle, U have to declare a ADODB.RECORDSET object and set the ActiveConnection property of the recordset to the connection u already opened (Eg CON) and
then set the command string property to the required SQL String
Then open the Record set. Now u ahve all the records in ur recordset.