Forums
This topic is locked
Replace in SC3 and pure asp Upload
Posted 14 Jul 2007 20:15:38
1
has voted
14 Jul 2007 20:15:38 Dimitris Kouris posted:
Hi all,
I am using pure asp upload to uplaoad an image and DW sc3
I am trying to mentaine the text format using the following:
Replace("Description",vbCrLf,"<br />"
For some reason it doesnt work! I even used the chr(10) chr(13) but again without luck.
As DW CS3 has changed its code could someone let me know how could be done?
here is a sample of my code:
If (CStr(UploadFormRequest("MM_update") = "form2" Then
If (Not MM_abortEdit) Then
' execute the update
' HERE IS WHERE I AM TRYING THE REPLACE
Dim Description, MM_editCmd
Description = UploadFormRequest("Description"
Description = Replace("Description",vbCrLf,"<br />"
Set MM_editCmd = Server.CreateObject ("ADODB.Command"
MM_editCmd.ActiveConnection = MM_dbcnxn_STRING
MM_editCmd.CommandText = "UPDATE MarketingPages SET Description = ?, Banner = ?, Name = ?, BussnessURLs = ? WHERE UserID = ?"
MM_editCmd.Prepared = true
THIS IS THE LINE WHICH THE REPLACE SHOULD... REPLACE STUFF <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 203, 1, 536870910, UploadFormRequest("Description") ' adLongVarWChar
Any ideas please?
Thanks in advance
Replies
Replied 23 Jul 2007 15:24:53
23 Jul 2007 15:24:53 Georgi Kralev replied:
Hi Dimitris,
You could change the following line:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>Description = Replace("Description",vbCrLf,"<br />"<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
To:
Description = Replace(Description,vbCrLf,"<br />"
Then replace the line:
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 203, 1, 536870910, UploadFormRequest("Description") ' adLongVarWChar
With
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 203, 1, 536870910, Description) ' adLongVarWChar
That should do the trick.
<b>Important note:</b>
This forum is not reviewed very often. Therefore, if you want to receive support for Pure Asp Upload, please write to the appropriate support forum.
These are the link to Pure ASP Upload forums:
Pure ASP Upload forums: www.dmxzone.com/forum/default.asp?NewsId=1622
Pure ASP Upload 3 forums: www.dmxzone.com/forum/default.asp?NewsId=12064
Regards,
Georgi Kralev
----------------------------------
Support - www.DMXzone.com
You could change the following line:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>Description = Replace("Description",vbCrLf,"<br />"<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
To:
Description = Replace(Description,vbCrLf,"<br />"
Then replace the line:
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 203, 1, 536870910, UploadFormRequest("Description") ' adLongVarWChar
With
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 203, 1, 536870910, Description) ' adLongVarWChar
That should do the trick.
<b>Important note:</b>
This forum is not reviewed very often. Therefore, if you want to receive support for Pure Asp Upload, please write to the appropriate support forum.
These are the link to Pure ASP Upload forums:
Pure ASP Upload forums: www.dmxzone.com/forum/default.asp?NewsId=1622
Pure ASP Upload 3 forums: www.dmxzone.com/forum/default.asp?NewsId=12064
Regards,
Georgi Kralev
----------------------------------
Support - www.DMXzone.com