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
Default

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...
Code:
var conn = Server.CreateObject("ADODB.Connection");
conn.Open(MM_nafpinc_DSN_STRING);
var strsql ="INSERT INTO members (DateAdd,JobTitle,JobDescription) VALUES ('7/1/2005','Test','test');";
conn.Execute(strsql);
Like mkayombo says, you may need to surround the date with hash signs, but this is only applicable to some databases e.g. Access

HTH,

Chris
Reply With Quote