Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Accessing Oracle 9i or Oracle 8i database server using Visual Basic 6 or VB.Net?

Re: Accessing Oracle 9i or Oracle 8i database server using Visual Basic 6 or VB.Net?

From: Thomas <T_at_T>
Date: Tue, 1 Apr 2003 12:07:33 -0500
Message-ID: <3e89c965$1@rutgers.edu>


I've used the ADO Type Library, 2.5, with the Oracle Provider for OLE DB (installed with the Oracle client), with success in VB 6. With a connection string, you're all set to program just as you would with any other database, using ADO.

If you need help with your connection string, and have Windows 2000, right-click the desktop. Make a new text file, and give it a ".UDL" extension instead of a ".TXT" extension. Then you get the Microsoft Data Link icon. Double-click it to create a connection string. When you're done with the wizard, right-click your UDL file, open it with Notepad, and copy/paste the connection string into your VB app. You can even reference the UDL file from your application if you want. (Pre-Win2k machines can right-click in the file frame of windows explorer, and choose new/data link.) I actually have a few UDL files handy for RAD purposes; a few clicks and I have my connection string, as opposed to typing the string out.

Keep in mind if you're programming for a server, you'll need to make sure the Oracle Provider for OLE DB is installed on the server. Also check Oracle's web site for bug fixes. Had a nasty problem using Visual C++ with the OLE DB ATL when executing a stored procedure; I was getting a non-null terminated string from the stored procedure. Couldn't find anything wrong; wound up coding a work-around for it. Later, I found out that it was a bug fix from Oracle; but we already had gone into production with the DLL.

You should have a doc file from Oracle on using the Oracle Provider for OLE DB. You -could- also use the ODBC driver, but remember, it's old technology, and will work slower. Might be good as a starting point.

Hope that helps,

-T

"hmrEwlsov" <DQyxoFmip_at_OuUtvmHj.q> wrote in message news:6173a.248473$Yo4.9795872_at_news1.calgary.shaw.ca...
> Hey all!
>
> Just looking to find out just what I need to do some programming in VB
> 6 or VB.Net to access an Oracle 8i or 9i server.
>
> Thanks!
>
>
Received on Tue Apr 01 2003 - 11:07:33 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US