View Single Post
  #6 (permalink)  
Old July 6th, 2005, 10:13 AM
ChrisScott ChrisScott is offline
Friend of Wrox
Join Date: Jul 2003
Location: , , United Kingdom.
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post

You are running an insert query and therefore do not need a recordset object, these are used when getting records out of a db.
You need to create a connection object and then use the Execute() method of that.
The expected ";" error is probably the line AddJob.Execute strsql - in javascript you need to surround method parameters with parenthesis e.g. AddJob.Execute(strsql)
Something like the following should work...
var conn = Server.CreateObject("ADODB.Connection");
var strsql ="INSERT INTO members (DateAdd,JobTitle,JobDescription) VALUES ('7/1/2005','Test','test');";
Like mkayombo says, you may need to surround the date with hash signs, but this is only applicable to some databases e.g. Access


Reply With Quote