Hi

FB2 SS, Firebird .Net provider 2.1.0, VS2005 c#.

I have in database one procedure like this:

CREATE PROCEDURE SYS_GET_PARAM (

    psubsystem char(3),

    pcode varchar(30) character set iso8859_2)

returns (

    pval varchar(30) character set iso8859_2)

as

begin

  select pvalue from sys_parameters

  where par_code=:pcode and subsystem=:psubsystem

  into :pval;

  suspend;

end^

 

Works ok with IBExpert.

In VS I have dataset defined, in tableadapter I have 1 sql defined as use
existing procedure with a single value return.

I try to run this:

DS.dsGTableAdapters.SYS_PARAMETERSTableAdapter taSYS_PARAMETERS = new
DS.dsGTableAdapters.SYS_PARAMETERSTableAdapter();

val =
taSYS_PARAMETERS.GetSysParameters("SYS","SYS_DB_BACKUP").Value.ToString();

I get error:" Additional information: arithmetic exception, numeric
overflow, or string truncation"

I used directly sql, same error!

 

I have try this:

FbConnection fbsyspar = new
FbConnection(Properties.Settings.Default.AppConnStr);

            FbCommand cmdGetSypParam = new FbCommand();

            cmdGetSypParam.CommandText = "SYS_GET_PARAM";

            cmdGetSypParam.CommandType = CommandType.StoredProcedure;

            cmdGetSypParam.Parameters.AddWithValue("PCODE", cod);

            cmdGetSypParam.Parameters.AddWithValue("PSUBSYSTEM", ss);

            cmdGetSypParam.Connection = fbsyspar;

            fbsyspar.Open();

            

            val = cmdGetSypParam.ExecuteScalar().ToString();

 

I get following error:

An unhandled exception of type 'FirebirdSql.Data.FirebirdClient.FbException'
occurred in FirebirdSql.Data.FirebirdClient.dll

Additional information: Dynamic SQL Error

SQL error code = -206

Column unknown

PCODE

No message for error code 336397208 found.

 

What shoud I modify to make use of my stored procedure???

TIA,

Paul

-------------------------------------------------------------------------
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