-
Aye Up Everybody,
I've written a small application to transfer data from .txt file on a server into an axcess database, all was good and well, But now I need to use the same prgram to connect to an oracle database and I just can't get it to work.
I'm using the following line of code ( The oracle database also has a username and password which will need to be incorporated aswell???)
Set DBconnect = Workspaces(0).OpenDatabase("D:\Oracle\Ora81\BIN\SQLPLUSW.EXE ")
The error message saise "unreccognisable database format"
Whatever the hell that means
Cheers 'n' beers ( and a big shout out to the manchester massif in de area - SKEEN
-
Assuming you have Oracle drivers installed (if not, see MSDN Q140255), here's an ADO snippet to open your connection:
Code:
'Replace <User ID>, <Password>, <Server> with appropriate parameters.
Dim Conn As String
Dim Cn As ADODB.Connection
Conn = "UID=*****;PWD=*****;driver={Microsoft ODBC for Oracle};SERVER=dseOracle;"
Set Cn = New ADODB.Connection
With Cn
.ConnectionString = Conn
.CursorLocation = adUseClient
.Open
End With
A different tact that will save you time, should your Oracle table have less than 500K rows, would be to setup a DSN on your local machine and then link the Oracle table(s) within your existing Access db; then use your current code, as is.
Hope this helps ;)
-