When I execute the following code I get the error..
Stored procedure get_nextid expects parameter @next_id which was not
supplied
What am I doing wrong
public String GetNewKey()
{
String myid = "";
OdbcConnection myConnection = new
OdbcConnection( "DSN=RMS5SQL_DS N;UID=FireRMS5_ USER;PWD=98953" );
myConnection.Op en();
OdbcCommand myCommand = new OdbcCommand("ge t_nextid", myConnection);
myCommand.Comma ndType = CommandType.Sto redProcedure;
OdbcParameter workParam = null;
workParam = myCommand.Param eters.Add("@nex t_id", OdbcType.Int);
workParam.Direc tion = ParameterDirect ion.Output;
myCommand.Execu teNonQuery();
myid = myCommand.Param eters["@next_id"].Value.ToString ();
//pad with "_000" to 14 length (Typical key in FireRMS)
myid = myid.PadLeft(14 ,'0');
return myid;
}
Stored procedure get_nextid expects parameter @next_id which was not
supplied
What am I doing wrong
public String GetNewKey()
{
String myid = "";
OdbcConnection myConnection = new
OdbcConnection( "DSN=RMS5SQL_DS N;UID=FireRMS5_ USER;PWD=98953" );
myConnection.Op en();
OdbcCommand myCommand = new OdbcCommand("ge t_nextid", myConnection);
myCommand.Comma ndType = CommandType.Sto redProcedure;
OdbcParameter workParam = null;
workParam = myCommand.Param eters.Add("@nex t_id", OdbcType.Int);
workParam.Direc tion = ParameterDirect ion.Output;
myCommand.Execu teNonQuery();
myid = myCommand.Param eters["@next_id"].Value.ToString ();
//pad with "_000" to 14 length (Typical key in FireRMS)
myid = myid.PadLeft(14 ,'0');
return myid;
}
Comment