this is the code and the error that appears when I executed, I want to make a more extensive trace of this error with ado or ODBC, I was trying to make a odbc tracing and nothing appears, any ideas??
Thanks in advance
public bool fncClientePorIDyClave(string IdCliente,string Password)
{
DataSet objDS = new DataSet(); //Dataset object is Instanced
bool ExistErrors = true; //assigns a true value on a boolean variable, this variable checks the function's answer
OdbcCommand odbcComm = new OdbcCommand(); // OdbcCommand object is Instanced
OdbcParameter odbcParam;
odbcParam = new OdbcParameter("idcliente",System.Data.Odbc.OdbcType.Char); //the parameter called idcliente of type char is assigned
odbcParam.Value = IdCliente; //parameter value assignment
odbcParam.Direction = ParameterDirection.Input; //parameter direction
odbcComm.Parameters.Add(odbcParam);
odbcParam = null;
odbcParam = new OdbcParameter("password",System.Data.Odbc.OdbcType.Char); // the parameter called password of type char is assigned
odbcParam.Value = Password; // parameter value assignment
odbcParam.Direction = ParameterDirection.Input; // parameter direction
odbcComm.Parameters.Add(odbcParam);
odbcParam = null;
odbcComm.CommandText = "pos.ClientePassword"; //The Store procedure name is given
odbcComm.CommandType = CommandType.StoredProcedure; //this object describes the command type to execute
OdbcConnection OdbcConn = new OdbcConnection("connection string with unify");//Object connection instanced
try
{
odbcComm.Connection = OdbcConn; //Object connection of odbcCommand instanced based on odbcConnection object
OdbcDataAdapter odbcDA = new OdbcDataAdapter(odbcComm); // OdbcDataAdapter is instanced by sending like parameter the OdbcCommand object
OdbcConn.Open(); //The data base has been opened
odbcDA.Fill(objDS); //The OdbcDataAdapter object fills the dataset with the possible results of the transaction
OdbcConn.Close(); //the data base has been closed
}
catch(OdbcException ERRcaught) //Errors catching section if any error appears this match will assign a false value to the result boolean variable
{
if(ERRcaught.Errors.Count > 0)
{
ExistErrors = false;
}
GC.Collect(); //the Garbage Collector is invoked for freeing memory purposes
}
finally
{
GC.Collect(); // the Garbage Collector is invoked for freeing memory purposes
}
return ExistErrors; //Returns the boolean variable answer of the funcion }
After all of this process, the function returns the following error in the catch section:
"ERROR [42000] [Unify][UnifyClient ODBC Driver][UnifyClient][UnifyLNA][Unify][Unify DataServer ODBC Driver][Unify DataServer]Syntax error in SQL dynamic statement. (1060)"