Ok I am doing an SQL insert and I get Too few parameters. Expected 2.
This used to work but another engineer got his hands on the database and changed field names and join types now
I get this error.
I changed all code in my asp page to reflect the field names and I even broke down the sql insert to one field and
it still errors in it. Below is my code.
I also removed all joins in the table so it is a simple insert and still I get the error...
Code:<!--#include file="Connect.asp" --> <% Dim Emp1 Dim Proj Dim qLevel Dim pDate Dim nDef Dim tTime Emp1 = CStr(Request("Emp")) Proj = CStr(Request("ProjName")) qLevel =Cstr(Request("LTest")) pDate = CStr(Request("InDate")) nDef = Cstr(Request("NumDefects")) tTime = cstr(Request("TestTime")) 'Response.Write(Emp1)& "<br>" 'Response.Write(Proj)& "<br>" 'Response.Write(qLevel)& "<br>" 'Response.Write(pDate)& "<br>" 'Response.Write(tTime) & "<br>" 'Response.Write(nDef)& "<br>" Function f(N) ret = Request.Form(N) ret = Replace(ret, "<", "<") ret = Replace(ret, ">", ">") ret = Trim(ret) ret = Replace(ret, "'", "''") If Len(ret) > 255 Then ret = Left(ret, 255) End If f = ret End Function 'Con.Execute("INSERT INTO TAGDB (TAG_NAME, TAG_TEXT, TAG_TIME) VALUES('" & f("Name") & "','" & mkicons(f("Text")) & "','" & Now & "')") conn.execute("INSERT INTO TrackerQuery(Employee, Project_Name, eDate, TestLevel, Hours, Number_of_Defects_Found)VALUES ('" & Emp1 & "','" & Proj & "','" & pDate & "','" & TTime & "','" & NDef & "','" & qLevel & "')") 'conn.execute("INSERT INTO TrackerQuery(Project_Name)VALUES ('" & Proj & "')") %> <HTML> <head> <title>Data Submitted</title> </head> <body> <h1 align="center">Thank You For Your Data</h1> <h2 align="center">You will redirected back to TimeTrackers main page</h2><br><br> <a href="http://ssd-web/ssd-dashboard2/index.html">NSS Home Page</a> <meta HTTP-EQUIV=REFRESH Content = "3;url=http://ssd-web/ssd-dashboard2/timetracker/ttmain.asp"> </body> </html>




Reply With Quote