General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Unicode value as parameter for view?
Hello All,
We have an application in which several fields are being converted to Unicode in SQL Server 2000. Does anyone know of a way to use a Unicode value in parameterized view? It is fairly easy in passthrough using the "N" prefix, as in
SELECT * FROM EMPLOYEE WHERE LASTNAME = N'your unicode value here'
But I can't find a way to pass a unicode parameter to a view, as in:
open database myDBC
create sql view "rvMyView" remote connection "XYZ" AS ;
select * from employee ;
where lastname = ?lcMyVar
lcMyVar = 'some unicode value here'
USE (myDbc!rvMyView) IN 0 ALIAS myview
The code above doesn't work. Traced with the debugger, lcMyVar will correcly show the unicode, but the query returns no data. A trace on the back-end SQL database showed that the query is arriving with what looks like ASCII code? (not really sure what it is, just numbers and symbols, probably the result of trying to interpret the unicode value as ASCII.) If I run the same query using SQL-passthru it does work.
Any suggestions greatly appreciated!
Vince
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only