Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: SQLPassthrough from Visual Basic to Oracle. HOW?

Re: SQLPassthrough from Visual Basic to Oracle. HOW?

From: Roland Svensson <roland.svensson_at_mbox200.swipnet.se>
Date: 1997/10/05
Message-ID: <3437CA02.779D@mbox200.swipnet.se>#1/1

It seems like passthrough queries can't find public synonyms on sys tables (or maybe dual is something special). I tried the following code on VB.5 (DAO) and it worked: Set Rs = Db.OpenRecordset("select ih_id.nextval as seq from sys.dual", dbOpenSnapshot, dbSQLPassThrough)
You must have a public synonym on the sequence or prefix it with sequence owner if you are running under som other user than the owner.
Hope this helps.
Roland

Northern Lake Service wrote:
>
> SQL*Net and ODBC are working correctly, but I cannot get the following code to
> work:
>
> Dim Rs As Recordset, Db As Database, Ndb As Workspace
> Set Ndb = Workspaces(0)
> Set Db = Ndb.OpenDatabase("NLS", False, False,
> "odbc;dsn=NLS;uid=aspen;pwd=scattner;database=NLS")
> Set Rs = Db.OpenRecordset("select ih_id.nextval from dual;", dbOpenSnapshot,
> dbSQLPassThrough)
> Rs.Close
>
> The above gives me ------ "Run-time error '3146': ODBC-call failed."
>
> I have NLS in the ODBC Administrator, and the ODBC Test on it works fine.
>
> I've tried the CreateQueryDef too, but must be doing it wrong.
>
> Any ideas on what i'm doing wrong???
>
> Chris Geske
> LIMS Manager
> Northern Lake Service, Inc.
> email: norlake_at_newnorth.net
  Received on Sun Oct 05 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US