Solved

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

Posted on 1998-07-28
4
200 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
  • 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

705 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now