- 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 1c2b3c0. However, it looks like there was a conflict with commit 77662f8 and the WinRT fix was partially lost.
Adam Comella
Microsoft Corp.
sqlparameter should be switched fromUnmanagedType.LPStrtoUnmanagedType.LPWStr(source).Prepare2calls should pass-1rather thanquery.Lengthto match the implementations on the other platforms (that parameter expects a number of bytes and I'm not sure usingquery.Lengthreturns the correct result).I believe this fix was already done for all platforms including WinRT in commit 1c2b3c0. However, it looks like there was a conflict with commit 77662f8 and the WinRT fix was partially lost.
Adam Comella
Microsoft Corp.