Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP Stored Proc
Message
 
 
General information
Forum:
ASP.NET
Category:
Other
Title:
Environment versions
Environment:
VB.NET 1.1
OS:
Windows Server 2003
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01033214
Message ID:
01034065
Views:
20
Hi Viv,

There is a DBF that contains login IDs and encrypted passwords. The ASP.NET login screen captures the login ID and (unencrypted) password and passes them to the VFP SP: spLogin(login ID,password)
The SP returns the PK of the user if valid or -1 if not.

Within the SP we locate the record that matches the login ID and store the corresponding encrypted password to a variable. There's another function that will do the unencryption: lcUnencryptedPassword = DeCrypt(lcPassword).
Within the DeCrypt() function there's a string of ascii characters which is used as a lookup to decrypt each character. I'm so used to thinking in terms of ascii that I was surprised to see the VFP help describe the ASC() function in terms of ANSI characters. Don't know if that would be the issue here, but there's definitely something different in the environment, because it works fine calling the SP from VFP.

I appreciate your suggestions - it helps clarify things just to think it through like this. I like your STRTOFILE() idea - that hadn't occurred to me, but it seems like a good way to debug in this situation.

Thanks!
John


>Hi,
>
>>>
>The error I get is "Function argument value, type, or count is invalid."
>It happens on a line containing this calculation:
>
>CHR(ASC(SUBSTR(lcEncryptedPassword,lnXX,1)) - 1)
>
>If I take this part out the error goes away. My ASP.NET debugging skills are still evolving, so I've isolated the problem by commenting out various parts of the code. This is what causes the error. (Of course it works fine in VFP.)
>>>
>
>I'm sorry - what you are attempting to do is still not clear. Am I right in assuming that you are passing a VB.NET string to a VFP stored proc ?
>If so you could try STRTOFILE()ing the lcEncryptedPassword string to check what the SP is receiving. Or just break that line up into 3 seperate lines to narrow it down.
>
>Regards,
>Viv
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform