View Single Post
  #2 (permalink)  
Old May 10th, 2005, 07:25 PM
mat41 mat41 is offline
Friend of Wrox
Points: 5,604, Level: 31
Points: 5,604, Level: 31 Points: 5,604, Level: 31 Points: 5,604, Level: 31
Activity: 40%
Activity: 40% Activity: 40% Activity: 40%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,666
Thanks: 6
Thanked 9 Times in 9 Posts
Send a message via AIM to mat41
Default

There are a few things wrong with your statement:

1.. SQL statements need to be strings: "INSERT INTO..."
2.. Need to assign the string to a variable sql="INSERT INTO..."
3.. No need for a commer after the last field name: Summary, )
4.. It is good practice to finish all queries with a trailing semi colon: ...);"
5.. I dont believe you can do this: , ##,

Anyhow try this:
sql = "INSERT INTO tb_blackhistorymonth (ProgramTitle, Coordinator, Events, EventTime, Location, Contact, Summary ) VALUES ('q', 'sdadssa', 'gfsdfgf', 'fdsgf', 'gsdfgsdf', '', '#5:00:00 PM#' );"

Comments:
Why enter an empty string (where you had the ##) - allow nulls.
BTW: Since I can not see your field data types there is no garantee it will work.


Wind is your friend
Matt
Reply With Quote