If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > function conversion

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-05-04, 03:43
piulibero piulibero is offline
Registered User
 
Join Date: Dec 2003
Location: Athens,GR
Posts: 16
Question function conversion

I wrote this function in vb but its veeery slow.i need to exclude the symbol included in the quotes from every string my loop finds.
how this function converts to sql statements?

Function MyTrim(str As String) As String
Dim q As Integer
Dim tmpstr As String

For q = 1 To Len(str)
If Mid(str, q, 1) <> " " Then
tmpstr = tmpstr & Mid(str, q, 1)
End If
Next

MyTrim = tmpstr

End Function

THANK YOU
Reply With Quote
  #2 (permalink)  
Old 02-06-04, 13:52
li810 li810 is offline
Registered User
 
Join Date: Feb 2002
Posts: 13
Test this code , not sure if it faster .

Do While Instr(str,1," ") > 1
Mid(str, Instr(str, 1, " "), 1) = ""
Loop

or in VB6

CustName = Replace(CustName, " ", "")
Reply With Quote
Reply

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 On
Pingbacks are On
Refbacks are On