Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 Other Topics
 Calling DB2 Stored Procs from ASP

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-10-01 : 01:07:50
Stanley writes "I can connect to the database just fine (I created a system DSN), and can execute embedded SQL. But whenever I try to call a stored proc, I get a variety of errors.

In MSSQL, this works fine:
set rs=mm.execute("Exec sp_getpatientinfo 202")
(This returns patient info for patient #202)

If I try using basically the same thing with DB2,
set rs=mm.execute("call sp_getpatientinfo 202")
I get:
N459 Switch Virtual Circuit Error No Truncation.
(Not as helpful as I would hope.)

But this:
set rs=mm.execute("call sp_getpatientinfo (202)")
Results in this other wonderfully informative message:
ange for host variable . X396 Literals are not supported as stor

(obviously truncated along the line somewhere)

I'm using the Merant DB2 ODBC driver against a DB2 version 7.2 database. My system is Win2K SP2, Interdev 6.0 SP5."
   

- Advertisement -