LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Get DB_VARWCHAR value from DB

Hi,

I'm trying to get a "DB_VARWCHAR" value type from a column of a table into a DB.

I have used the function "DBBindColChar" but without success: it replaces always the existing chars (unicode) with a '?' (the original string is "Принимаю" and the function get "????????").
More, I have tried to use the function "DBBindColBinary", but always it returns only the first 4 bytes (2 unicode char) of the original string.

The DB is SQL Server and the column is set to NVARCHAR type.
Suggestions?

Thanks a lot for your precious support!

0 Kudos
Message 1 of 2
(2,529 Views)

Well,

I found a workaround.

  1. I modify the query from select column_name from table_name where ...   to     select CONVERT(binary(500), column_name, 0) from table_name where ...
  2. I use the function "DBBindColBinary" to get the unicode characters into BYTE array
  3. ...
0 Kudos
Message 2 of 2
(2,490 Views)