I'm trying to run this code from the ASP.Net code:

string strupdate = "Insert into registers(user, module, event_type)" +
    "values (" +
    "'" + user + "'," +
    "'" + event + "'," +
    "'" + source + "');";

/* connSQL it's the ODBC connection type: System.Data.Odbc.OdbcConnection */
connSQL.ExecuteNonQuery();

The query results into the following:

Insert into registers(user, module, event_type)values('user01','message','control');

Running this query from psql works perfectly fine, but running from the web returns the ODBC 07002 error with the following message: The # of binded parameters < the # of parameter markers

Related posts

Recent Viewed