Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Replace Formatted Numbers with text 9 61
using Access 8 59
How to produce a SHA-1 hash function in vb6 in order to save it to a table 8 36
Hide vba in gp 7 83
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
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…

910 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

17 Experts available now in Live!

Get 1:1 Help Now