Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Server Always Encrypted
Message
From
03/04/2024 21:38:01
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., New Zealand
 
 
To
03/04/2024 05:13:52
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01687795
Message ID:
01687816
Views:
47
Hi John,

Without seeing field types I suspect at least part of this is going to be variable type versus field type: they need to match, as SQL Server performs few translations for encrypted columns. This might be clearer if ODBC wasn't chopping off the error messages including the advice at the end(!) So can I suggest you try these queries in SSMS, for 2 reasons:

- SSMS shows the full error message with advice, and you can hover mouse for other useful info (e.g. what will happen to your parameters).
- That will eliminate VFP and ODBC from the equation.

Once you see it working in SSMS it should be much easier to replicate via ODBC.

There's quite a good guide here: https://learn.microsoft.com/en-us/sql/relational-databases/security/encryption/always-encrypted-query-columns-ssms?view=sql-server-ver16
...including permissions needed to access the column keys and how to turn on Always Encrypted in SSMS (it's off by default as access via SSMS negates the purpose of Always encrypted). Don't forget permissions for keys!
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us.
"
-- Shakespeare: Coriolanus, Act 1, scene 1
Previous
Reply
Map
View

Click here to load this message in the networking platform