Hugo,
I don't have that much experience with DB2, but is there a statement
termination character in the stored procedure, and if so, what is it?
--
Carsten Thomsen
Enterprise Development with Visual Studio .NET, UML, and MSF
http://www.apress.com/book/bookDisplay.html?bID=105
"Hugo Gonzo" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi all,
>
> i have a problem execute a sql-script on DB2 database from a dotnet c#
> program. The sql-script terminates after a CALL statement. The
> following code should ilustrate this.
>
> the sql-script:
>
>
> OleDbConnection con = new OleDbConnection("Provider=IBMDADB2; User
> ID=User1; Password=user1; Data Source=MyDB; Timeout=3600");
> con.Open();
>
> // the simple sql-script
> string script = "SELECT * FROM Table1; CALL TestProc; SELECT * FROM
> Table2;"
>
> OleDbCommand cmd = new OleDbCommand(script, con);
> OleDbDataAdapter adapt = new OleDbDataAdapter(cmd);
> DataSet ds = new DataSet();
> int k = ds.Tables.Count;
>
> // here the DataSet contains one Table, if I remove the CALL TestProc;
> from the sql-script i get two Tables
>
>
> The script comes to the call TestProc (which is called correctly) and
> then exit without an error. The script execute correctly.
>
> my enviroment:
> DB2 Database 8.1.2
> .Net 2003
>
> Another question is:
> How can i change the statement termination character from OleDB ?
>
> any solutions
>
> Hugo