Re: Insert into MySql Table
First: I do believe you have a matter due to the use of the "@" parameter that mySql does not like.
Originally Posted by Raidzen10
In any case, you should be consistent with yourself : you used "?" in the parameters, and you should use it also in the query, like in the following example:
string theQuery = "INSERT INTO Users(Name, Surname, Pass, Email, Type)
you have some special names there:
you should surround them in brackets : "[" and "]"
Third (less important, this is to make your life better, you can completely disregard the following)
string theQuery = "INSERT INTO Users([Name], Surname, Pass, Email, [Type])
c# is case sensitive, thus you might have a variable named "com" foro the commandString and a variable named "Com" for the Command Object. But let me suggest you to name one of the two in a different way