Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: Re: Trouble adding row with recordset


Message #1 by "Ken Schaefer" <ken@a...> on Fri, 1 Nov 2002 14:28:55 +1100
In Internet Explorer goto "Tools | Internet Options | Advanced", and uncheck
"Show Friendly HTTP Errors", and refresh the page. You should get some more
details (including error message and number). PLease post that data ot the
list.

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Edward T. Owens" <dagger1@c...>
Subject: [access_asp] Re: Trouble adding row with recordset


: Sorry I forgot to mention the error I was receiving..
:
:
: HTTP 500 - Internal server error
: Internet Explorer
:
:
:
:
:
: > Hi,
: I> 'm relatively new to asp and having difficulties with writing data to
: t> he database. My connection string is good since I can read the data. I
: t> hink maybe it has something to do with the primary key is an auto
: I> ncrementing field. Does this field update itself or do I have to
: include
: i> t in the addnew, update phase? For instance the primary key is before
: t> he UserName field but I left it out thinking that it would
: autoincrement
: t> hat field automatically when using addnew update.....here is the code
:
: > If Not bolMatchFound then
:  >        objRS.AddNew
: > objRS("UserName") = Trim(Request.Form("UserName"))
: > objRS("FirstName") = Trim(Request.Form("FirstName"))
: > objRS("ICQ") = Request.Form("ICQ")
: > objRS("Email") = Trim(Request.Form("Email"))
: > objRS("Committee") = Request.Form("Committee")
: > objRS("Comment") = Trim(Request.Form("Comment"))
: > objRS("misc") = "some data"
: > objRS("Status") = "Active"
: > objRS("PassCode") = Trim(Request.Form("PassCode"))
: > objRS.Update
: > strFailed = "You can now login...."
: E> lse
: > Session("AuthCount") = Session("AuthCount") + 1
: E> nd if
: o> bjRS.Close
: S> et objRS = Nothing
: o> bjConn.Close
: S> et objConn = Nothing


  Return to Index