From: Lee C. <lee...@ad...> - 2003-07-23 16:26:36
|
I am having trouble getting a stored procedure to execute properly. = Below is my stored procedure definition and my code definition. STOREDPROCEDURE =3D CREATE PROCEDURE LOGINUSER ( USERLOGINNAME VARCHAR(255), USERLOGINPASS VARCHAR(255)) RETURNS ( USERLOGINID INTEGER, USERPRIVILEGEID SMALLINT) =20 public int ExecuteNonQuery(string aConnectionString, CommandType = aCommandType, string aCommandText, FbParameterCollection aParams) { using (FbConnection connection =3D new FbConnection(aConnectionString)) { connection.Open(); FbTransaction trans =3D connection.BeginTransaction(); FbCommand command =3D new FbCommand(aCommandText, connection, trans); command.CommandType =3D aCommandType; SetParameters(command.Parameters, aParams); //command.Prepare(); return command.ExecuteNonQuery(); }=20 } I call my code (ExecuteNonQuery) like this: string connectionString =3D "User=3DSYSDBA;" + "Password=3Dmasterkey;" + "Database=3Dc:\\program files\\Marathon\\Projects\\login.gdb;" + "Server=3Dw2k-server;" + "Port=3D3050;" + "Dialect=3D3;" + "Charset=3DNONE;" + "Role=3D;" + "Connection lifetime=3D15;" + "Pooling=3Dtrue;" + "Packet Size=3D8192"; SqlAccess sql =3D new SqlAccess(); FbParameterCollection param =3D new FbParameterCollection(); param.Add( new FbParameter("@userloginname", = FirebirdSql.Data.Firebird.FbType.VarChar, "Lee")); param.Add( new FbParameter("@userloginpass", = FirebirdSql.Data.Firebird.FbType.VarChar, "Pass")); int result =3D sql.ExecuteNonQuery(connectionString, = CommandType.StoredProcedure, "LOGINUSER", param); What am I doing wrong? Thank you! |