Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Sunday, May 5, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - Legacy Development
Forum to discuss SalesLogix legacy development including views, scripts, etc.. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to Legacy Development | New ThreadView:  Search:  
 Author  Thread: Replace Function
Sankar
Posts: 84
 
Replace FunctionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Dec 10 10:21 AM
fiogf49gjkf0d

I am trying to to replace single quotes with 2 single quotes in a sql query. Unfortunately the sql is in a legacy plugin. Any ideas?


Is there a Replace() function or anything similar in legacy.  


 Thanks


Uma

[Reply][Quote]
Dave Purnell
Posts: 7
 
Re: Replace FunctionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Dec 10 3:10 PM
fiogf49gjkf0d

Hi Uma,


There wasn't a Replace() in cypress enable (legacy), however, here is a function that replaces the single quote for a double quote that served me for more years than I care to remember in the legacy world.
Play with it to your hearts content.




Function PQ(ByVal astrValue As String) As String
   Const SQ = "'"
   Dim i As Integer
   Dim VL As Integer
   Dim sCtC As String
   Dim NV As String
   VL = Len(astrValue)
   If VL = 0 Then
      PQ = astrValue
      Exit Function
   End If
   For i = 1 To VL
      sCtC = Mid$(astrValue, i, 1)
      If sCtC = SQ Then
         NV = NV & SQ & SQ
      Else
         NV = NV & sCtC
      End If
   Next i
   PQ = NV
End Function


 


Regards,



Dave

[Reply][Quote]
Sankar
Posts: 84
 
Re: Replace FunctionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Dec 10 8:29 AM
fiogf49gjkf0d

Thanks a lot, Dave


I will try this.


 


Uma

[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 5/5/2024 7:04:09 AM