Command won't Execute... odd error

Results 1 to 2 of 2

Thread: Command won't Execute... odd error

  1. #1
    Dalan Galma Guest

    Default Command won't Execute... odd error

    I&#039m building a VERY simple page... takes info from a form, builds SQL UPDATE command, updates the database. Not hard, eh? I already have working pages for creating (INSERT) and deleting (DELETE) records... all I need is an update page. I just copied the code from the other page and changed the SQL. That worked for everything but this update page. Here&#039s the code I have:<BR><BR>Dim objConn<BR>Set objConn = Server.CreateObject("ADODB.Connection")<BR>objConn .ConnectionString = strConnect<BR>objConn.Open<BR><BR>updSQL= &#039I created an SQL UPDATE here... I&#039ve tried with every other type of SQL string, just to debug, but it dosen&#039t work.<BR><BR>Set objCmd=Server.CreateObject("ADODB.Command")<BR><BR >objCmd.ActiveConnection=objConn<BR>objCmd.Command Type=adCmdText<BR>objCmd.CommandText=updSQL<BR>obj Cmd.Execute<BR><BR>Now, I put debugging Response.Write-s in here, and it stops at objCmd.Execute, and gives me this error: <BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80040e10&#039<BR>[Microsoft][ODBC Microsoft Access 97 Driver] Too few parameters. Expected 1.<BR><BR>line 65<BR><BR>Line 65 seems to be random, it changes every time. I&#039m using a simple Access database, and I have no idea how to get this command to execute. Please help! Thanks in advance...

  2. #2
    Steve Lewis Guest

    Default RE: Command won't Execute... odd error

    Are you using a question mark(?) in your SQL update statement? If so then it will read this as a parameter and produce the above error.

Posting Permissions

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