Home » Open Source » Programming Interfaces » EXECUTE IMMEDIATE - Bind Variable - DB-Link (Ora10)
EXECUTE IMMEDIATE - Bind Variable - DB-Link [message #285701] Wed, 05 December 2007 06:02 Go to previous message
panzertape
Messages: 20
Registered: August 2007
Junior Member
Hi all!

I have a problem using bind variables in a EXECUTE IMMEDIATE-Statement over a database link to MS SQL Server.
I am trying it this way:
EXECUTE IMMEDIATE 'insert into table@"DB-LINK" values (:1,5)'
USING variable;
COMMIT;

table has two fields: text-field and a primary key field. (B1=text, 5=PK)
I'm ending up with a ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Generic Connectivity Using ODBC][A00A] Execute query failed, datasource is 'ora', SQL text is 'INSERT INTO "table" ("varc","pk") VALUES (?,5)'

Why it isn't recognizing my bind variable??
What am I doing wrong??

The DB-Link and a 'normal' INSERT is working:
insert into varch_test@db_link values ('sample_text',5);

But I need to pass the contents of a variable to the other DB.
Do you have any ideas for a solution / workaround ?

thanks in advance
panzertape
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: informatica 8.1.1
Next Topic: Connection with the server (merged)
Goto Forum:
  


Current Time: Thu Apr 25 18:51:46 CDT 2024