Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP Stored Proc
Message
De
20/07/2005 07:50:16
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Versions des environnements
Environment:
VB.NET 1.1
OS:
Windows Server 2003
Database:
Visual FoxPro
Divers
Thread ID:
01033214
Message ID:
01034186
Vues:
25
Hi John,
I didn't have a problem with passed strings from ASP.Net (asc() works correctly in the 0-255 range).
One thing I noticed in your post, probably misunderstood. Are you saying you keep password encryption,decryption routines in stored procedures? If so it's next to keeping them as plain text.
Cetin

>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform