Results 1 to 3 of 3

Thread: HELP!

  1. #1
    aia Guest

    Default HELP!

    My broblem is this- <BR>After loading my site to the server, asp pages which have a code in sql ordering to insert data received by the users into the users table perform an error such as- <BR>"ODBC microsoft access driver-operation must use updateable query". <BR><BR>1. It worked greate on my computer using PWS, so whats wrong now? <BR>2. in the users table, which was created in access 2000, i did not specify a primary key(maybe it causes problems???) <BR>please try & help me. <BR><BR>&#060;% <BR>dbName="booksdb.mdb" <BR>%&#062; <BR><BR>&#060;!-- #INCLUDE virtual="/asp/"--&#062; <BR><BR>&#060;% <BR>Set rc=Server.createObject("ADODB.Recordset") <BR>rc.ActiveConnection=myconn <BR> "Select * FROM users WHERE (fname=&#039" & Request.Querystring("fname") & "&#039 and lname=&#039" & Request.querystring("lname") & "&#039)" <BR>If rc.EOF Then <BR>myconn.Execute "insert into users(fname,lname,email,password) values(&#039" & request.querystring("fname") & "&#039 , &#039" & request.querystring("lname") & "&#039, &#039" & request.querystring("email") & "&#039 , &#039" & request.querystring("password") & "&#039)" <BR>rc.close <BR>myconn.close <BR>response.Cookies("users")("fname")=request.que rystring("fname") <BR>response.Cookies("users")("lname")=request.que rystring("lname") <BR>response.Cookies("users")("email")=request.que rystring("email") <BR>response.Cookies("users")("password")=request. querystring("password") <BR>response.Cookies("users").Expires=#1/1/2004# <BR>Else <BR>Response.Redirect ("noentry.asp") <BR>End If <BR>%&#062; <BR><BR><BR>--------------------------------------------------------------------------------<BR> <BR><BR><BR><BR>--------------------------------------------------------------------------------<BR>Messages

  2. #2
    Join Date
    Dec 1969

    Default RE: HELP!

    from what I can see you are asking the SQL statement to find the object Request.QueryString("fname") but you are not assigning a value to this object until after you have executed the SQL statement. You need to move the code that extracts the data from the cookie to before the SQL statement.<BR><BR>Hope this helps.

  3. #3
    aia Guest

    Default RE: HELP!

    hi Gaz!<BR>i receive the request.querystring("fname") from the former page a user visits where he has entered data into a form and one of that is named "fname".<BR>So your answer, i believe is incorrect , plus, it all worked well on my computer using personal web server.

Posting Permissions

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