Remote Oracle Database Querying?
All,
I'm trying to connect to a remote Oracle database from a VB5 program using ODBC direct. I can open a DSN, create & run a query, and analyse the resulting records that are returned from the query, BUT ONLY WHEN THE APPLICATION IS RUNNING ON THE MACHINE WHICH ORACLE IS INSTALLED.
The goal is to get the software running on a machine that "talks to" the Oracle database via a TCP/IP connection. I have created the TCP/IP link, and installed SQL*Net on both the server and the client machines and can open the DSN from a remote machine. However, the problem is that I can't create a QueryDef on the db. It's almost as if I've somehow got a read-only connection to the database, even though I can't see where this is set - do I have to specify a writeable connection as a parameter somewhere? The code I'm using is:
set MP5DB = OpenDatabase("", 0, true, "ODBC;DSN= student;UID= student;PWD= student;")
set qdfBonusEarners = MP5DB.CreateQueryDef("")
With qdfBonusEarners
.Connect = "ODBC;DATABASE=student;UID= student;PWD= student;DSN= student "
.SQL = "SELECT * FROM STUDENT WHERE STUDENT.NAME='JONES'"
set rstBonusRecipients = .OpenRecordset()
End With
I’d really appreciate any comments you may have as this is driving me crazy!
TIA
Si
Re: Remote Oracle Database Querying?
you wrote:
>It's almost as if I've somehow got a read-only connection to the database
Indeed, the third parameter in your Opendatabase method call is true, which in fact is the readonly flag.
>set MP5DB = OpenDatabase("", 0, true, "ODBC;DSN= student;UID= student;PWD= student;")
Re: Remote Oracle Database Querying?
Lothar,
Thanks for the speedy reply - that was a mistake on my half - I've changed it to false, false and it still fails on the same call (CreateQueryDef). Any ideas?
Thanks
Si