Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP 3.0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 24th, 2006, 07:04 AM
Registered User
 
Join Date: Jul 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 15 - Update sql db problem

This may have been answered already, but I couldn't find it. In the AddUser.asp file, everything works fine until it hits the rsUsers.Update line. The only msg that I get returned is The page cannot be displayed. It is connecting to the MS SQL db fine. I have tried opening it with optimistic, dynamic and keyset and I get the same results. Can anyone suggest anything else. Below is my modified code. Thanks.


<%
  Dim rsUsers, intIDForNewRecord, adOpenKeyset, adLockOptimistic, adCmdTable
  adOpenKeyset = 1
  adLockOptimistic = 3
  adCmdTable = &H0002
  Set rsUsers = Server.CreateObject("ADODB.Recordset")
  rsUsers.Open "UserBase", objConn, adOpenKeyset, adLockOptimistic, adCmdTable

  rsUsers.Filter = "Email = '" & Request.Form("Email") & "'"
  If Not rsUsers.EOF Then
    Session("UserExist") = "True"
    Session("Update") = "True"
    Response.Redirect "Register.asp"
  Else
    rsUsers.Filter = 0
    rsUsers.MoveLast
    intIDForNewRecord = rsUsers("UserId") + 1
    rsUsers.AddNew
    rsUsers("UserId") = intIDForNewRecord
    rsUsers("Email") = Request.Form("Email")
    rsUsers("Password") = Request.Form("Password")
    rsUsers("LastName") = Request.Form("LastName")
    rsUsers("FirstName") = Request.Form("FirstName")
    rsUsers("Address1") = Request.Form("Address1")
    rsUsers("Address2") = Request.Form("Address2")
    rsUsers("City") = Request.Form("City")
    rsUsers("State") = Request.Form("State")
    rsUsers("ZipCode") = Request.Form("ZipCode")
    rsUsers.Update
  End If

  Dim strName, strValue For each strField in rsUsers.Fields
    strName = strField.Name
    strValue = strField.value
    Session(strName) = strValue
  Next
  Session("blnValidUser") = True Response.Redirect "Login.asp"
%>
  #2 (permalink)  
Old November 19th, 2006, 06:20 PM
Registered User
 
Join Date: Nov 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I had the same problem and just through trial and error i added the type lib explain earlier in the book after you i specified the include file.. it goes like this:




this worked for me let me know if it works for you

Matt

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
chapter 15 problem golfbird BOOK: Beginning Visual C++ 6 7 September 9th, 2008 12:29 PM
Chapter 15 problem PhilM BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 16 March 10th, 2008 02:46 PM
Chapter 15 Problem rsearing BOOK: Beginning ASP.NET 2.0 and Databases 3 October 12th, 2006 02:59 PM
Chapter 15 15_1 & 15_2 and setting up SQL server a3321889495 BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 0 July 13th, 2006 06:19 AM
A new chapter 15 problem with BBcodes PhilM BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 2 September 11th, 2004 11:11 PM



All times are GMT -4. The time now is 01:22 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.