Solved

Connect to Oracle

Posted on 2000-03-26
4
176 Views
Last Modified: 2010-05-02
Anyone can help to specify an example to connect to Oracle 7.3 database
using VB 4?
0
Comment
Question by:MWarrenC
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 2659869
1) Build a Alias using SQL Easy Config (coming with Oracle Client install)
2) Connectstring will go like
"DBQ=YourAliasName;Driver={Oracle73};UID=Username;PWD=pwd"


For the Name of the driver, look in the Control Panel-ODBC-Drivers and copy the name of the driver you want to use (case sensitive)

Hope this helps
0
 

Expert Comment

by:szden
ID: 2659911
ODBC?
No thanks.

ADO Yes, Yesy, Yes!

1.Put MS ADO data control on a form.
2.Click right mouse button and choose properties.
3.Click on Build... (connection string)
4.Choose MS OLE DB provider for Oracle
5.Click Next.
6.Enter data (serevr name is DB alias created using SQL easy config)
7.Test connection
8.OK

Now you can copy connection string from ADODC properties.
(Of course, after pasting Connection string into code, ADODC is not needed anymore)
0
 
LVL 5

Expert Comment

by:Voodooman
ID: 2660062
Ado - no thanks - to many bugs and too slow!!

Voodooman!

Also dont think VB4 supports ado - no controls - need VB6 to get that!
0
 

Accepted Solution

by:
maheshsivakumar earned 25 total points
ID: 2660179
I have used this code to connect to Oracle data base and it works fine. I have used rdoconnection object. Try this.I hope VB4 supports this.Create a dsn name to Oracle database and try following code.
dim en as rdoenvironment,db as rdoConnection

Set en = rdoEnvironments(0)
Set db = en.OpenConnection(dsname:="trainora", Connect:="uid=train1;pwd=train1;", Prompt:=rdDriverNoPrompt)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month4 days, 3 hours left to enroll

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question