Quantcast
Channel: Oracle, MySQL, Sybase, Informix and other databases
Viewing all articles
Browse latest Browse all 1350

why this error?

$
0
0

Dear reader,

i have tried to update my colum TimeStamp but i have tried many way's stil the same error and nothing will becomes updated,

Why do i get this error,
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '21:00:09 WHERE Name = 'Michel van Soest'' at line 1

Here is my snap of script,

public void Tijd()
    {
        string connectionString = "server=xx.xx.xx;Database=test;Uid=xx;password=xx;";
        MySqlConnection MySqlConnection = new MySqlConnection(connectionString);
        MySqlConnection.Open();

        string QueryString = ("UPDATE users SET TimeStamp " + date + " WHERE Name = '" + Name + "'");

        MySqlCommand MySqlCommand = new MySqlCommand(QueryString, MySqlConnection);
        MySqlCommand.ExecuteNonQuery();
        MySqlConnection.Close();
 
    }



Viewing all articles
Browse latest Browse all 1350

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>