ERROR 1193 (HY000): Unknown system variable
Posted by: Macamba .
Date: August 07, 2015 04:58AM

Another one makes me scratch my head. I'm trying to update my database using a prepared statement. I got an java.sql.SQLException: Unknown system variable 'projectnumber'. I tried to execute the SQL statement in my 'MySQL Console' with the same result.

The error states the system variable 'projectnumber' is unknown. But it is a field name. Or am I looking in the wrong direction?

mysql> SET projectnumber=100101, project=TimeKeeper, activity=DAOTest,  per_numb
er=100101, day=2015-04-10, worked_time=04:15:00 FROM projects WHERE pro_id=2;
ERROR 1193 (HY000): Unknown system variable 'projectnumber'
mysql>
mysql>
mysql> describe projects;
+---------------+-------------+------+-----+---------+----------------+
| Field         | Type        | Null | Key | Default | Extra          |
+---------------+-------------+------+-----+---------+----------------+
| pro_id        | int(11)     | NO   | PRI | NULL    | auto_increment |
| projectnumber | varchar(64) | YES  |     | NULL    |                |
| project       | varchar(64) | YES  |     | NULL    |                |
| activity      | varchar(64) | YES  |     | NULL    |                |
| per_number    | varchar(64) | YES  |     | NULL    |                |
| day           | date        | YES  |     | NULL    |                |
| worked_time   | time        | YES  |     | NULL    |                |
+---------------+-------------+------+-----+---------+----------------+
7 rows in set (0.06 sec)

Options: ReplyQuote


Subject
Written By
Posted
ERROR 1193 (HY000): Unknown system variable
August 07, 2015 04:58AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.