Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
AT() Function
Message
From
20/11/1996 10:41:34
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00012891
Message ID:
00012893
Views:
23
>lcLoginString = "jpaskett,ADMINISTRATOR,*******"
>
>this.cUserName = LEFT(lcLoginString, AT(",", lcLoginString) - 1)
>this.cUserLevel = SUBSTR(lcLoginString, AT(",", lcLoginString) + 1)
>this.cUserLevel = LEFT(this.cUserLevel, AT(",", this.cUserLevel) - 1)
>

Try:

nFirstComma = At(',', lcLongString, 1)
nSecondComma = At(',', lcLongString, 2)
This.cUserName = Substr(lcLongString, 1, nFirstComma - 1)
This.cUserLevel = Substr(lcLongString, nFirstComma + 1, nSecondComma - 1)
This.cUserLevel = Substr(lcLongString, nSecondComma + 1)
Alexandre Nobre
Alpha Bytes Computer Corp.

Did you know that there are innocent people dying in East Timor?
It helps if you do...

I suppose you don't need glasses if you're able to read this line

Previous
Next
Reply
Map
View

Click here to load this message in the networking platform