ODBC-Sql Server String Value problem


kanber

Recommended Posts

Posted

Hi,

When I tried to read data from SQL server with ODBC. Int values reading OK. but On nvarchar(50) values I am getting NaN. Also on Table is showing "???"

how can I solve the problem.

sqlqr.ReceteAdi column is nvarchar(50).

 

global dbase=db.Open("Deneme")

//qr = DB.Query(dbase,"Select * from dbo.Receteler")
global sqlqr = db.Query(dbase,"Select * from Receteler")

db.Close(dbase)

Posted

Using regular Query is largely deprecated for the QueryToClass() function.  Try that one instead.  Not only is it faster (performance wise) and easier to use, it also has had more recent field type updates.

Posted

Thank you.

 

But I have problem read sys.Tables with nvarchar type. I need to get all table name for checking somethings. How can I do that. As I see daqfactory is support varchar types. but on that system column I can't change the type.

Posted

I believe NVarChar is for unicode.  DAQFactory isn't compiled for unicode, and so even if you could read this field type, it wouldn't look right.  Do a search on the web for converting NVARCHAR to VARCHAR inside a query (SELECT).  For example, I quickly found a database forum that shows a CONVERT() function, as well as a CAST() function.  I have not used these, but they, especially the cast() look quite promising.

Archived

This topic is now archived and is closed to further replies.