I did what you posted and it works on some sprocs but not all... sometimes I
get a Dynamic SQL Error
parameter mismatch for procedure BE_LOCATION_INFO_INSERT.
I'll look more into this tomorrow with the DBA and post some more info.


On 5/13/07, Jiri Cincura <[EMAIL PROTECTED]> wrote:

Yes, you're right.

But if you want to use this statement as SP, use it like:
using (FbConnection conn = new FbConnection(cs))
{
     conn.Open();
     using (FbCommand cmd = conn.CreateCommand())
     {
         cmd.CommandText = "test_insert"; // NO "test_insert(@id, ...)"
         cmd.CommandType = System.Data.CommandType.StoredProcedure;
         cmd.Parameters.Add("@id", FbDbType.Integer).Value = 1;
         ...
         cmd.ExecuteNonQuery();
     }
}

So, not to place parameters into command text into braces (that is what
I've missed in your first mail). Then it will be working as you expect.

Sorry for confusion. ;)

--
Jiri {x2} Cincura
http://blog.vyvojar.cz/jirka/ | http://www.ID3renamer.com

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to