Solved

ODBC Question: How do you connect VB4 to oracle using 16-bit ODBC

Posted on 1998-07-28
4
204 Views
Last Modified: 2010-05-03
We are trying to coonect VB4 to Oracle using 16-bit ODBC.  Standard code does not work.  Anybody have any ideas?  Do we have to use WIN95 APIs or is there standard way to get thru?
0
Comment
Question by:ramdan
[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
  • 2
4 Comments
 
LVL 7

Expert Comment

by:tward
ID: 1466956
You can use Oracle Objects for OLE which should be on the Client CDs with plenty of help.

I can also give some examples here, just let me know after installing Oracle Objects for OLE if you need examples, but the help that comes with it is pretty good.
0
 

Author Comment

by:ramdan
ID: 1466957
We need to use ODBC. Oracle objects for ole is too slow.

0
 

Accepted Solution

by:
frankhommers earned 100 total points
ID: 1466958
Hope this helps: And what "standard way" do you use?


Dim lDB as database
Dim lRS as recordset
Dim I as integer

   Set lDB = Workspaces(0).OpenDatabase("", False, False, "ODBC;")
   Set lRS = lDB.OpenRecordSet("SELECT * FROM yourtable", dbOpenDynaset, dbSQLPassThrough
Debug.Print "Contents of your query:"
While not lRS.EOF
  For I = 0 to lRS.Fields.Count - 1
  Debug.Print lRS.Fields(I)
  Next I
  lRS.MoveNext
Wend

0
 
LVL 7

Expert Comment

by:tward
ID: 1466959
Oracle objects for OLE is no slower than ODBC.
0

Featured Post

Technology Partners: 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

Suggested Solutions

Title # Comments Views Activity
Adding to a VBA? 6 91
Visual Studio search word table and return Cell index 8 85
How to set the sa password in a vb6 code for sql connection 9 69
Problem to line 23 80
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

739 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