Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Type of field to store encrypted value
Message
From
05/04/2019 10:19:01
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01667839
Message ID:
01667979
Views:
48
>I sense frustration in your voice/writing. I am not arguing with you; I am just trying to find a condition when storing the string with un-printable characters in a Char type field fails. It could be a certain setting of the SQL Server; which I am willing to duplicate. Once I know that there is a potential problem (that I can duplicate), I can plan an alternative approach. And I am going to test the varbinary with the ODBC but not sure if it will work.

Yes, exactly, frustration.
I am trying to tell you what you should use based on experience and you are simply resisting with no solid base. I have already seen problems in encrypted fields stored in SQL Server as char, varchar fields (nchar, nvarchar are totally out of the equation). I am trying to tell you that in N different ways to no avail, so I surrender.

One final thing, a clear test for you. In VFP suppose your encrypted string value is:
local lcEncrypted
lcEncrypted = "very very"+chr(0)+" secret password"
create cursor vfpCursor (myPwd c(200))
insert into vfpCursor (myPwd) values (m.lcEncrypted)

? m.lcEncrypted == left(vfpCursor.myPwd, len(m.lcEncrypted)) && VFP should store it in a char field without loss
Now store this value in SQL Server using char, varchar, nvarchar as you wish and then retrieve to see what you have got back.
Ç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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform