View Full Version : Connecting to oracle via VB Acess Script


lookingforhelp
02-19-2008, 08:27 AM
Hi,
sorry for misspelling access

What i want to do is connect to an oracle database(on a server) via my MS access database and i want to be able to update an oracle table by using a script that takes information from my ms access table.

I will greatly appreciate any help on this, Thanks in advanced.

I found the following code to connect to the database but now i want to test it.

Public Sub OuvrirConnexion()
Dim Conn
Set Conn = New ADODB.Connection
Dim strConn As String

strConn = "Server=myserver; DSN=myDSN; UID=myusername; PWD=mypassword"

Conn.Open strConn



Conn.Close
End Sub

FoFa
02-19-2008, 10:09 AM
You have to have the Oracle client loaded on the machine making the connection.
Server name is a TNSname entry.
DSN is a DSN, usually machine, setup to handle the connection, typically via OLE DB
User ID and Password is the Oracle Database Userid and password with access to the table/view

lookingforhelp
02-29-2008, 05:12 AM
You have to have the Oracle client loaded on the machine making the connection.
Server name is a TNSname entry.
DSN is a DSN, usually machine, setup to handle the connection, typically via OLE DB
User ID and Password is the Oracle Database Userid and password with access to the table/view

hello again,

When i try to connect and i get this error eventhough I have the oracle client installed.
[microsoft odbc driver for oracle][oracle] ORA-12514: message 12514 not found;
product = RDBMS80; facility=ORA.


I also tried this way:

strConn = "ODBC;UID=noridc;PWD=nodier;DSN=Oracle and MS;SERVER=nana;"
but i get this error: [ microsoft][ odbc driver manager] driver's sqlsetconnattr failed.


Any help is appreciated.
Thanks in advanced

KeithG
02-29-2008, 06:02 AM
Take a look at this website, it should help

http://www.connectionstrings.com/

lookingforhelp
02-29-2008, 07:24 AM
thanks FoFa and KeithG problem fixed.