0

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.

user1133907
  • 5
  • 1
  • 3

1 Answers1

0
  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.

James John McGuire 'Jahmic'
  • 11,728
  • 11
  • 67
  • 78
  • Hi Jahmic, Thanks for the reply. I could see the full insert query values with proper commas.As per strGdt value is a date and time and considering it as a string then trying to insert the values.IS there any other way to get current time and date of the System.instead of using ctime()?.Am not getting any error ..but how to chekc whether query executing r not? – user1133907 Jan 06 '12 at 11:22