Could not Insert the data using VC++ in MYSQl database

278 views Asked by At

am using MSvisual C++ 2008 and running the below code to insert the values to db.MYSQL server 5.1 is teh database.

Could please let me know why its not inserting and let me know where was the problem.

1

There are 1 answers

1
James John McGuire 'Jahmic' On
  1. Your insert statement on the values looks like it could be missing the first comma.
  2. Just throwing out that strGdt directly into the values end looks mighty suspectful.

  3. Probably most helpful in the long run: Use some error detection. Are you getting any exceptions? What comes out on the debugging console? Try using some mysql error functions. Add some logging... These are just the tip of the iceberg as far as options on trying to figure out what is wrong with this... yourself.

Hope this helps.