Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Other Programming > VBScript
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VBScript For questions and discussions related to VBScript.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VBScript 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
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old November 19th, 2004, 04:20 PM
Registered User
 
Join Date: Nov 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default need help new to this site

Value is not getting inserted into clearance ( from strAccess to strClearance) Help please

Where is my mistake
Thank you
Attach Code

<%

Dim strAccess
    strClearance = client
    If Request.Form("Access") = "realestatesales" Then
    strAccess = realtor
     End If

set cmdInsert = Server.CreateObject("ADODB.Command")
cmdInsert.ActiveConnection = MM_RFSOnline_STRING
cmdInsert.CommandText = "INSERT INTO personaldata (username, password, clearance, firstname, lastname, spousename, spouselastname, phone, cell, address, city, state, zip, mailaddress, mailcity, mailstate, mailzip) VALUES ('" + Replace(cmdInsert__strEmailAddress, "'", "''") + "', '" + Replace(cmdInsert__strPassword, "'", "''") + "', '" + Replace(cmdInsert__strClearance, "'", "''") + "', '" + Replace(cmdInsert__strFirstName, "'", "''") + "', '" + Replace(cmdInsert__strLastName, "'", "''") + "','" + Replace(cmdInsert__strSpouseName, "'", "''") + "','" + Replace(cmdInsert__strSpouseLastName, "'", "''") + "','" + Replace(cmdInsert__strPhone, "'", "''") + "', '" + Replace(cmdInsert__strCell, "'", "''") + "', '" + Replace(cmdInsert__strAddress, "'", "''") + "', '" + Replace(cmdInsert__strCity, "'", "''") + "', '" + Replace(cmdInsert__strState, "'", "''") + "', '" + Replace(cmdInsert__strZIP, "'", "''") + "', ' " + Replace(cmdInsert__strMailAddress, "'", "''") + "', '" + Replace(cmdInsert__strMailCity, "'", "''") + "',' " + Replace(cmdInsert__strMailState, "'", "''") + "', '" + Replace(cmdInsert__strMailZIP, "'", "''") + "') "
cmdInsert.CommandType = 1
cmdInsert.CommandTimeout = 0
cmdInsert.Prepared = true
cmdInsert.Execute()
%>


Reply With Quote
  #2 (permalink)  
Old November 22nd, 2004, 05:52 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote: Value is not getting inserted into clearance
What else do you observe, when you say value is not getting inserted? Any sort of error you see? Can you do a response.write of insert statement and post here?
Code:
...
...
cmdInsert.Prepared = true
Response.write cmdInsert.CommandText 
Response.end
cmdInsert.Execute()
Cheers!

_________________________
- Vijay G
Strive for Perfection
Reply With Quote
  #3 (permalink)  
Old December 17th, 2004, 03:18 PM
Registered User
 
Join Date: Dec 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:
I'm a bit confused by the question you are asking and the code you posted.

The first 5 lines (through the End If) seem to have nothing to do with the rest of the code.

To respond to your comment on 'Value is not getting inserted into clearance (from strAccess to strClearance):

strClearance = strAccess <- this will make the value of strClearance the same as what is contained in strAccess.
Reply With Quote
  #4 (permalink)  
Old December 20th, 2004, 08:10 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 62%
Activity: 62% Activity: 62% Activity: 62%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Try this:

'======================================
Dim strAccess
Dim strClearance

strClearance = "client"

    If Request.Form("Access") = "realestatesales" Then
       strAccess = "realtor"
    End If
'======================================

You can't pass strings unless they are in quotes.
Where are you getting the "Request.Form("Access") from?


mmcdonal
Reply With Quote
Reply


Thread Tools
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
Site Down pinch BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 25 October 15th, 2007 03:15 AM
Publish Web Site & Copy Web Site angshujit ASP.NET 2.0 Basics 1 June 15th, 2007 09:21 AM
site help LiquidMayCry Forum and Wrox.com Feedback 1 August 2nd, 2005 03:52 AM
how do i change the site icon on a geocitiies site uprocker2 HTML Code Clinic 2 March 4th, 2005 06:20 AM
New Site etc.. Ammiel Forum and Wrox.com Feedback 0 June 21st, 2003 10:40 PM



All times are GMT -4. The time now is 09:33 AM.


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