JScript, Inserting Number in SQL

Results 1 to 2 of 2

Thread: JScript, Inserting Number in SQL

  1. #1
    Join Date
    Dec 1969

    Default JScript, Inserting Number in SQL

    Hi, I&#039;m having a problem inserting into my access database. My browser says, "Data type mismatch". I think it happens when I am trying to delete/insert a row in the database using number to reference that column in the database, specifically my "ProjectID". Here is the code below, its really simple, hopefully you can help. Thanks!<BR><BR>&#060;%<BR>var ProjID = Session("Project_to_edit"); //this is a number<BR><BR>DSN = "DSN=Webtracker";<BR>Conn = Server.CreateObject("ADODB.Connection");<BR>Conn.O pen(DSN);<BR><BR>sql = "delete from Projects where ProjectID=&#039;" + ProjID + "&#039;"; //this is where the error occurs!!!<BR><BR>Conn.Execute(sql);<BR>Conn.Close( );<BR>%&#062;<BR>

  2. #2
    Join Date
    Dec 1969

    Default Nothing to do with JScript...see ASPFAQs


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts