HighDots Forums  

Emergency help please

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Emergency help please in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
dprulhiere
 
Posts: n/a

Default Emergency help please - 11-19-2004 , 05:03 PM






Sorry to be so pesky but I need an answer as quickly as possible here is the
thread...
http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=189&
threadid=923423&forumid=12 Thank you


Reply With Quote
  #2  
Old   
darrel
 
Posts: n/a

Default Re: Emergency help please - 11-19-2004 , 05:12 PM






Quote:
Sorry to be so pesky but I need an answer as quickly as possible here is
the
thread...
Anyone that is going to answer you is likely in the newsgroup, so posting a
link to the web forum won't be much use.

What was your question?

-Darrel




Reply With Quote
  #3  
Old   
dprulhiere
 
Posts: n/a

Default Re: Emergency help please - 11-19-2004 , 05:43 PM



Sorry a small level of frustration. Here is the question repeated. Variable
is not getting inserted into clearance ( from strAccess to strClearance) Help
please Where is my mistake Thank you Attach Code <% Dim strAccess
strAccess = '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
  #4  
Old   
CMBergin
 
Posts: n/a

Default Re: Emergency help please - 11-19-2004 , 06:03 PM



See my response to your other thread. But in addition to that, you have
another problem.
Recall that you need to surround values with single quotes for your
database. SQL <> HTML <> VBScript. Replace your VBScript single quotes
with doubles, as I said in the other thread.
Now, for every variable below, you'll have to add single quotes in your SQL
string. Example:

VALUES(" + Replace(cmdInsert__strEmailAddress,"'","''") + "," + ...
becomes
VALUES('" + Replace(cmdInsert__strEmailAddress,"'","''") + "','" + ...

Make sure you do that for all of your text variables.

"dprulhiere" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Sorry a small level of frustration. Here is the question repeated.
Variable
is not getting inserted into clearance ( from strAccess to strClearance)
Help
please Where is my mistake Thank you Attach Code <% Dim strAccess
strAccess = '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
  #5  
Old   
dprulhiere
 
Posts: n/a

Default Re: Emergency help please - 11-19-2004 , 06:53 PM



Dont know why you dont see the '' it is there and I pasted the code directly
from MX . In my posts, I see the quotes the way you are telling me to do it,
but in your reply it shows incorrectly. Is the IF THEN and the REPLACE correct
aside from these quotes. Every insert works except for CLEARANCE I would
imagine because I am trying to slip in a variable. Nothing gets inserted to
this field


Reply With Quote
  #6  
Old   
dprulhiere
 
Posts: n/a

Default Re: Emergency help please - 11-19-2004 , 08:16 PM



Problem 95% solved

Now the variable is being plugged in.

code should have been
'' + strAccess + ''
Instead of
''+ Replace(cmdInsert__strClearance, ''', '''') + '',

Thank you

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.