Hi guys, i m tying to learn how to work with stored procedures, but i cant make it work.

In every single tutorial i found on the internet i said this:

cmd.CommandText =  "StoredProcedureName";

but in my case it didnt work, it just workes when i use:

cmd.CommandText = "EXECUTE PROCEDURE StoredProcedureName(@param1, @param2, @param3)";

I m making a Data Access Layer, and i would like it to make my application work with Firebird and Sql Server without changing code, i know less about Sql Server then i know firebird, but i think that this "Execute procedure" will not work there...

How can i make this thing works?

I m passing the parameters like this:

cmd.Parameters.AddWithValue("@Param1", somevalue);

And here is my stored procedure:

CREATE PROCEDURE SP_INS_CIDADE (
    INCID_COD INTEGER,
    INCID_NOME VARCHAR(60),
    INEST_COD CHAR(2))
AS
begin
    INSERT INTO CIDADES (CID_COD, CID_NOME, EST_COD) VALUES(:incid_cod, :incid_nome, :inest_cod);
end


Thanx for any help,

-Fábio.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to