[help]insert record into MySQL db using ASP.NET???
I am having problem in inserting record into MySQL table. It just keep inserting NULL value to the table.
Below is my code: (I am using ODBC Connection)
insert into compensation (HP,System,AddDate,Times) values (@HP,@System,@AddDate,1)
MySQLODBCCmd.Parameters.Add("@AddDate", DateAdd(DateInterval.Day, -1, Now()))
I have tried to use " ? " instead of "@" but the problem is still there...
Can anyone resolve this problem??
thanks in advance,
Excellent ... please could you tell me the solution .. I have exactly the same problem .. keep on inserting null values to the database regarding names ... numbers are inserted though !!
Thank you in advance ..
Your parameters need to match in your stored procedure so if you are passing in @HP then your stored procedure variable needs to be @HP.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)