How Can I Connect VB To Oracle?

2

2 Answers

hina mariam Profile
hina mariam answered
Visual Basic is very easy to use and to much popular language.Microsoft provides this language.and mainly this language is used for window based applications.
data access methods that all accomplish exactly the same task are DAO, RDO, ADO and OLE DB
DAO
DAO stands for Data Access Objects it permits Visual Basic application to talk to a database. for the manipulation of databases it uses the Jet Database Engine.the functionalities of the jet engine is as like the ODBC.
RDO
RDO stands foe Remote Data Objects.it permits Visual Basic to talk to relational databases.it is the need of Enterprise Edition of the visual basic to use the RDO.
ADO
ADO stands for Active X Data Objects.its permits VB and other web tools to interface with different type of data sources.ADO is very simple in use and very powerful.
OLE DB
OLE DB ,utilizes a set of COM interfaces for finding and arranging the data.
RDO and DAO are working for backward compatibility.but it is batter to convert to ADO or OLE-DB.
code for connecting the VB with oracle:

Set Cn = New ADODB.Connection

With Cn
.connection string = Conn
.cursor location = adUseClient
.Open
End With
If Cn.State = adStateOpen The
MsgBox "Connection successful."
End If

'Connect to Oracle server end
'close connection begin
Cn.Close
Set Cn = Nothing
Set CP = Nothing
'close connection end
karthik meher Profile
karthik meher answered
You can use ODBC(Open Database Connectivity) to link them up. In the control panel, find administrative services and click on odbc and follow the instructions.

Answer Question

Anonymous