Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle Database and Vb Front End

Status
Not open for further replies.

Cap2010

Programmer
Mar 29, 2000
196
CA
Hi,<br><br>I am using Oracle as my database and<br>Vb as front end. The only problem is<br>How do I go about in connecting the Oracle<br>database with VB. ?
 
Hi there,<br><br>There are a few different ways to do this and these different methods all have more than one layer.<br><br>From Bottom to Top:<br><br>The bottom layer is your network - TCP/IP<br><br>Then the SQL*Net layers<br><br>&nbsp;&nbsp;&nbsp;&nbsp;TCP Adaptor<br>&nbsp;&nbsp;&nbsp;&nbsp;SQL*Net<br><br>Then an API - an Application Programmer Interface. Something a VB programmer like you and me calls to do something on the Oracle DB.<br><br>Then (finally) your VB application.<br><br>You <b>must</b> have the SQL*Net layers.<br><br>The API layer is where you have your choice. ODBC fits in here for instance and is very popular. I would ask about ODBC in the VB forum.<br><br>We use Oracle Objects for OLE - which is excellent.<br><br>Regards,<br> <p>Mike Lacey<br><a href=mailto:Mike_Lacey@Cargill.Com>Mike_Lacey@Cargill.Com</a><br><a href= Cargill's Corporate Web Site</a><br>
 
I use ADO to connect to oracle from VB6 using the data enviroment object.&nbsp;&nbsp;its very easy and the help files are easy to follow
 
First you should go to ODBC configuration program and create an alias for your oracle database. Once you add your oracle database to the existing ODBC databases, then it's easy to connect to the database in VB using ADO or RDO. You'll have to provide the alias name, username and password at the connection time (or even set that in properties, though I never tried it myself).<br><br>I hope that will help.<br><br>Regards,<br>Ayaz.
 
i create dsn name and use ADO for connection but till it gives me problem.

it shows errors for addnew records and negotiation buttons(First , Next, Last , Previous)

so how can i solve this problem?
 
Don't use dsn connection. It's a badly idea.
You can make it without ODBC.
You need to build the correct connection strig of the ADODB.Connection object, using OLEDB.

Of course, that you need to have the correct TNSNAMES.ORA setted up at the computer that is accesing to the database (The WebServer) .
 
Can someone tell me where a good resource for some sample code would be? I am just learning how to develop in VB and would like to use it to connect to an oracle database. I have been reading a bit about ADO and RDO.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top