The marshaling for the sql parameter should be switched from UnmanagedType.LPStr to UnmanagedType.LPWStr (source).
Here and here the Prepare2 calls should pass -1 rather than query.Length to match the implementations on the other platforms (that parameter expects a number of bytes and I'm not sure using query.Length returns the correct result).
I believe this fix was already done for all platforms including WinRT in commit 1c2b3c0f1c4bd66017484fbca412b869b0d93547. However, it looks like there was a conflict with commit 77662f8cd413ea782ee01c2aa99dc67816bad260 and the WinRT fix was partially lost.
sql
parameter should be switched fromUnmanagedType.LPStr
toUnmanagedType.LPWStr
(source).Prepare2
calls should pass-1
rather thanquery.Length
to match the implementations on the other platforms (that parameter expects a number of bytes and I'm not sure usingquery.Length
returns the correct result).I believe this fix was already done for all platforms including WinRT in commit 1c2b3c0f1c4bd66017484fbca412b869b0d93547. However, it looks like there was a conflict with commit 77662f8cd413ea782ee01c2aa99dc67816bad260 and the WinRT fix was partially lost.
Adam Comella Microsoft Corp.