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