View Single Post
  #1 (permalink)  
Old July 1st, 2005, 03:12 PM
turbo_rabbit turbo_rabbit is offline
Authorized User
Join Date: Jul 2005
Location: Mishawaka, IN, USA.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Trouble executing SQL statement

I an very new to ASP (this week to be exact, been doing Coldfusion), and so far I have liked coding with it. Anyway here is my problem.

I am tring to do an insert statement with the following code:
(this it all the code on the page)


   var AddJob = Server.CreateObject("ADODB.Recordset");
   AddJob.ActiveConnection = MM_nafpinc_DSN_STRING;
   strsql ="INSERT INTO members (DateAdd,JobTitle,JobDescription) VALUES ('7/1/2005','Test','test')"

   AddJob.Execute strsql

   <% Response.Write(strsql) %>

Here is the error that is generated when I try to load the page:

    Microsoft JScript compilation error '800a03ec'

    Expected ';'

    /nafpinc/_admin/employment-act.asp, line 15

    AddJob.Execute strsql

I have tried putting in the ';', but I still receive the same error message.
Reply With Quote