Subject How i call to stored procedure from .NET ?
Author dimasalt
I have problem calling store procedure from .NET , database is
FirebirdSql 1.5.

I have this code in C#.NET that actualy should call to stored
procedure that make update in one of table.
(the stored procedures work for sure, the asp.net code make problems).


public void UserOnlineDelete()

{
DateTime timeNow = DateTime.Now;
string timeNowString = timeNow.AddMinutes(-15).
ToString("yyyy-MM-dd
hh:mm:ss");

try
{
FirebirdSql.Data.Firebird.FbConnection con = new
FbConnection(ConnStr);
con.Open();

FirebirdSql.Data.Firebird.FbTransaction myTransaction = con.
BeginTransaction();

FirebirdSql.Data.Firebird.FbCommand ConnCommand = new
FbCommand("DELETE_ONLINE_USER", con, myTransaction);
ConnCommand.CommandType = CommandType.StoredProcedure;

FirebirdSql.Data.Firebird.FbParameter mytime = new
FbParameter("TIMENOW", FbType.VarChar);
mytime.Value = timeNowString;
ConnCommand.Parameters.Add(mytime);

ConnCommand.ExecuteNonQuery();
myTransaction.Commit();
con.Close();
}
catch
{
}
}// end of function

I know that this piece of code will work on MS SQL, but some how it
make me problems in FirebirdSql.
I will apercite any code in .NET that work with stored procedures (if
you can give me exemple of update and select procedures calls from
ASP.NET), there no even one exemple in .NET provider help for
FirebirdSql, and it's pretty sad :-(