Database Update????? Urgent
-
Hi, I want to use CDatabase::ExecuteSQL to execute a update sql statement to Access database. I use the following sql statement. sql="update table_name set col_name=\"dd'ee\" where id=1"; (the content of col_name has a ') it doesn't work. Please help me solve the problem!! thanks a lot!! Alan
-
Hi, I want to use CDatabase::ExecuteSQL to execute a update sql statement to Access database. I use the following sql statement. sql="update table_name set col_name=\"dd'ee\" where id=1"; (the content of col_name has a ') it doesn't work. Please help me solve the problem!! thanks a lot!! Alan
Did you test the SQL statement in Access? It looks like there might be an error in it. It appears you have an apostrophe character in the string value for the col_name field. I am not positive but i seem to remember that Access and other relational DB's do not support that character in string data.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
-
Did you test the SQL statement in Access? It looks like there might be an error in it. It appears you have an apostrophe character in the string value for the col_name field. I am not positive but i seem to remember that Access and other relational DB's do not support that character in string data.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
-
Hi, I want to use CDatabase::ExecuteSQL to execute a update sql statement to Access database. I use the following sql statement. sql="update table_name set col_name=\"dd'ee\" where id=1"; (the content of col_name has a ') it doesn't work. Please help me solve the problem!! thanks a lot!! Alan
-
Hi, I want to use CDatabase::ExecuteSQL to execute a update sql statement to Access database. I use the following sql statement. sql="update table_name set col_name=\"dd'ee\" where id=1"; (the content of col_name has a ') it doesn't work. Please help me solve the problem!! thanks a lot!! Alan
-
Try this syntax: strQuery = "UPDATE employees " strQuery += "SET employee_lastname = " + m_Value; strQuery += "WHERE employee_id = " + nEmpId; remove those slashes TaknUmone
-
alanshen209 wrote: it doesn't work. What does that mean? Does it throw an exception?
"No matter where you go, there your are." - Buckaroo Banzai
-pete