PDA

View Full Version : can't insert into firebird



gravendor
16 Jan 2008, 12:16 AM
Hi guys, NEWBIE here........help me pliss,
i can't insert into firebird database,
this the error message :


{"name":"JSONRPCError","message":"Exception of type
'FirebirdSql.Data.Common.IscException' was thrown.","stackTrace":"
at FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteNonQuery()\r\n
at CarlaWeb.user.AddUser(String idOpr, String nmOpr, String usernm, String pass) in
http:\\localhost\\handler\\user.ashx:line 73","errors":[{"name":"FbException","message":"Dynamic SQL Error\r\nSQL
error code = -104\r\nNo message for error code 335544851found."},
{"name":"IscException","message":"Exception of type 'FirebirdSql.Data.Common.IscException'
was thrown."}]}

and this the handler code :



[JsonRpcMethod("AddUser", Idempotent = true)]
[JsonRpcHelp("Echoes back the text sent as input.")]
public string AddUser(string id, string name , string user, string pass)
{
using (FbConnection connection = new
FbConnection(ConfigurationSettings.AppSettings["ConnString"]))
{
string sqlstr = "Insert Into LOG (xID, xNAME, xUSER,xPASS) " +
"Values ('" + id + "','" + name + "','" + user + "'," + pass + "')";
FbCommand command = new FbCommand(sqlstr, connection);
command.Connection.Open();
command.ExecuteNonQuery();
command.Connection.Close();
return sqlstr;
}
}


thx b4

regards,


grave