[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.odbcnet

Enterprise Library 2006 - Calling Stored Procedure in DB2

Memphis

9/1/2006 3:00:00 PM

How do you call a DB2 Stored Procedure??? Below is the latest that I have
tried and it still fails. Any suggestions would be greatly appreciated.

**** Code Sample & Error Message

'Set the Database to Connect to
Dim db As Database = DatabaseFactory.CreateDatabase(MACConstants.CONNECTTODB)

' Name of Stored Procedure in DB2
Dim dbCommand As DbCommand = db.GetStoredProcCommand("MACCO01P")

' Set parameter
db.AddInParameter(dbCommand, "CopyFromCopyToEffDte", DbType.String,
"CopyFromCopyToEffDte")

Dim productDataSet As DataSet = db.ExecuteDataSet(dbCommand)

**The ExecuteDataSet gives me the following error.
ERROR [42601] [IBM][CLI Driver][DB2] SQL0104N An unexpected token
"<END-OF-STATEMENT>" was found following "". Expected tokens may include:
"<IDENTIFIER> ". SQLSTATE=42601