ODBC-Sql Server String Value problem


kanber

Recommended Posts

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)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.