|
-
Feb 9th, 2000, 04:19 AM
#1
Thread Starter
Member
The following is my code:<%
on error resume next
'form_name=Request.QueryString("name")
ID = Request.QueryString("ID")
USER= Request.QueryString("USER")
WRKS_NAME= Request.QueryString("WRKS_NAME")
WRKS_TYPE= Request.QueryString("WRKS_TYPE")
SERIAL_NUM= Request.QueryString("SERIAL_NUM")
LOCATION= Request.QueryString("LOCATION")
DEPARTMENT= Request.QueryString("DEPARTMENT")
PROCESSOR= Request.QueryString("PROCESSOR")
conn="DSN=INVENTORY;uid=invuser;pwd=invpassword"
Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open "Main",Conn,adopenstatic,adlockoptimistic
'Main is the table
RS.AddNew
rs.Fields("ID") = ID
rs.Fields("USER")= USER
RS.Fields("WORKSTATION NAME")= WRKS_NAME
RS.Fields("WORKSTATION TYPE")= WRKS_TYPE
RS.Fields("SERIAL NUMBER")= SERIAL_NUM
RS.Fields("LOCATION")= LOCATION
RS.Fields("DEPARTMENT")= DEPARTMENT
RS.Fields("PROCESSOR")= PROCESSOR
rs.Update
rstemp.Close
set rstemp=nothing
response.redirect "inventory1.asp"
%>
There is no error, but no record is add. Did I do something wrong here?
Thanks
-
Feb 9th, 2000, 04:30 AM
#2
remove on error resume next and find out what the error is
Originally posted by ptran:
The following is my code:<%
on error resume next
'form_name=Request.QueryString("name")
ID = Request.QueryString("ID")
USER= Request.QueryString("USER")
WRKS_NAME= Request.QueryString("WRKS_NAME")
WRKS_TYPE= Request.QueryString("WRKS_TYPE")
SERIAL_NUM= Request.QueryString("SERIAL_NUM")
LOCATION= Request.QueryString("LOCATION")
DEPARTMENT= Request.QueryString("DEPARTMENT")
PROCESSOR= Request.QueryString("PROCESSOR")
conn="DSN=INVENTORY;uid=invuser;pwd=invpassword"
Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open "Main",Conn,adopenstatic,adlockoptimistic
'Main is the table
RS.AddNew
rs.Fields("ID") = ID
rs.Fields("USER")= USER
RS.Fields("WORKSTATION NAME")= WRKS_NAME
RS.Fields("WORKSTATION TYPE")= WRKS_TYPE
RS.Fields("SERIAL NUMBER")= SERIAL_NUM
RS.Fields("LOCATION")= LOCATION
RS.Fields("DEPARTMENT")= DEPARTMENT
RS.Fields("PROCESSOR")= PROCESSOR
rs.Update
rstemp.Close
set rstemp=nothing
response.redirect "inventory1.asp"
%>
There is no error, but no record is add. Did I do something wrong here?
Thanks
-
Feb 9th, 2000, 05:04 AM
#3
Thread Starter
Member
I get the following error message after I comment out the 'on error
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'USER'.
Any Ideas what this error mean?
-
Feb 9th, 2000, 06:33 AM
#4
Hyperactive Member
You have the word 'User' a number of times in your code so set a breakpoint and step through the code with F8 to see where it is falling down.....It could be something quite simple like your User needs to be in quotes.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|