Giter Club home page Giter Club logo

Comments (19)

wankdanker avatar wankdanker commented on August 20, 2024

Hi @orenz.

What does your connection string look like? Have you tried specifying the charset connection parameter? (http://dev.mysql.com/doc/refman/5.0/en/connector-odbc-configuration-connection-parameters.html)

from node-odbc.

orenz avatar orenz commented on August 20, 2024

"ODNC;DSN=kuku;DRIVER=MySQL ODBC 5.2w
Driver;charset=hebrew;SERVER=IWIZMYSQL;UID=WIZSOFT;PWD=xxxx;DATABASE=xxx;"

works with C++ ODBC well

On Mon, Nov 5, 2012 at 5:08 PM, Dan VerWeire [email protected]:

Hi @orenz https://github.com/orenz.

What does your connection string look like? Have you tried specifying the
charset connection parameter? (
http://dev.mysql.com/doc/refman/5.0/en/connector-odbc-configuration-connection-parameters.html
)


Reply to this email directly or view it on GitHubhttps://github.com//issues/27#issuecomment-10073737.

from node-odbc.

wankdanker avatar wankdanker commented on August 20, 2024

OK. I will have to research this. We just use SQLGetData(..., buffer, ...) to get the values from ODBC and then String::New(buffer). I'm not sure what needs to be done so that V8 will play nice with other code pages.

from node-odbc.

wankdanker avatar wankdanker commented on August 20, 2024

The issue might be that we were specifying SQL_CHAR for TargetType in the case of

SQLRETURN SQLGetData(
    SQLHSTMT       StatementHandle,
    SQLUSMALLINT   Col_or_Param_Num,
    SQLSMALLINT    TargetType,
    SQLPOINTER     TargetValuePtr,
    SQLLEN         BufferLength,
    SQLLEN *       StrLen_or_IndPtr);

Better results might be had if using SQL_C_WCHAR, but I am not sure. I have tried testing this against my MSSQL server which has some Hebrew characters in an NVARCHAR field, but am not getting those same characters back. Not sure where the problem lies.

If you have working C++ ODBC code, what does your SQLGetData() call look like?

from node-odbc.

wankdanker avatar wankdanker commented on August 20, 2024

OK, I think I have resolved this issue; at least as far as my tests go. It's going to have to cook for a while though before it makes its way to a release.

The issue was a combination of previously using SQL_CHAR for the TargetType and the buffer being a char* buffer which has been changed to uint16_t* buffer

You can get the code from my v0.4-separation branch:

https://github.com/wankdanker/node-odbc/tree/v0.4-separation

from node-odbc.

orenz avatar orenz commented on August 20, 2024

I really appreciate this.
Hope to test soon, though it might take a few days.

On Mon, Nov 5, 2012 at 9:53 PM, Dan VerWeire [email protected]:

OK, I think I have resolved this issue; at least as far as my tests go.
It's going to have to cook for a while though before it makes its way to a
release.

The issue was a combination of previously using SQL_CHAR for the
TargetType and the buffer being a char* buffer which has been changed to uint16_t*
buffer

You can get the code from my v0.4-separation branch:

https://github.com/wankdanker/node-odbc/tree/v0.4-separation


Reply to this email directly or view it on GitHubhttps://github.com//issues/27#issuecomment-10085105.

from node-odbc.

orenz avatar orenz commented on August 20, 2024

Hi
I want to check this fix now. how do I install this:
https://github.com/wankdanker/node-odbc/tree/v0.4-separation

from node-odbc.

wankdanker avatar wankdanker commented on August 20, 2024

Hi @orenz,

You can use npm to install from git repositories if you are on a system that has git; like this:

npm install git://github.com/wankdanker/node-odbc.git#v0.4-separation

Where everything after the # is a branch, tag or commit hash.

It would be nice if you would test the v0.5 branch also/instead. That version has a test runner and some tests which include a Unicode test that may be related to your issue.

npm install git://github.com/wankdanker/node-odbc.git#v0.5

If you are on Windows, you will have to grab a zip file from github of the branch or tag. Here is a link to the v0.5 zip file:

https://github.com/wankdanker/node-odbc/archive/v0.5.zip

Hope this helps,

Dan

from node-odbc.

orenz avatar orenz commented on August 20, 2024

I am on win.
Got the zip, compiled it. Now I get :

odule.js:340
throw err;
^
rror: Cannot find module 'bindings'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object. (C:\Program
Files\nodejs\node_modules\node-odbc-0.5\odbc
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)

what is wrong ?

On Wed, Nov 21, 2012 at 5:53 PM, Dan VerWeire [email protected]:

Hi @orenz https://github.com/orenz,

You can use npm to install from git repositories if you are on a system
that has git; like this:

npm install git://github.com/wankdanker/node-odbc.git#v0.4-separation

Where everything after the # is a branch, tag or commit hash.

It would be nice if you would test the v0.5 branch also/instead. That
version has a test runner and some tests which include a Unicode test that
may be related to your issue.

npm install git://github.com/wankdanker/node-odbc.git#v0.5

If you are on Windows, you will have to grab a zip file from github of the
branch or tag. Here is a link to the v0.5 zip file:

https://github.com/wankdanker/node-odbc/archive/v0.5.zip

Hope this helps,

Dan


Reply to this email directly or view it on GitHubhttps://github.com//issues/27#issuecomment-10602443.

from node-odbc.

wankdanker avatar wankdanker commented on August 20, 2024

run npm install to pull in the bindings module.

from node-odbc.

orenz avatar orenz commented on August 20, 2024

How can I install from a file directory ?

On Wed, Nov 21, 2012 at 6:55 PM, Dan VerWeire [email protected]:

run npm install to pull in the bindings module.


Reply to this email directly or view it on GitHubhttps://github.com//issues/27#issuecomment-10605006.

from node-odbc.

wankdanker avatar wankdanker commented on August 20, 2024

I'm not sure if I understand what you are asking. But you could also install the bindings module by downloading a zip file from github (https://github.com/TooTallNate/node-bindings/archive/master.zip) and placing the contents in your-odbc-folder/node_modules/bindings

from node-odbc.

orenz avatar orenz commented on August 20, 2024

Sorry , got it working.
Hebrew is not OK though.
does this:https://github.com/wankdanker/node-odbc/archive/v0.5.zip includes
the Hebrew fix ?

On Wed, Nov 21, 2012 at 7:06 PM, Dan VerWeire [email protected]:

I'm not sure if I understand what you are asking. But you could also
install the bindings module by downloading a zip file from github (
https://github.com/TooTallNate/node-bindings/archive/master.zip) and
placing the contents in your-odbc-folder/node_modules/bindings


Reply to this email directly or view it on GitHubhttps://github.com//issues/27#issuecomment-10605492.

from node-odbc.

wankdanker avatar wankdanker commented on August 20, 2024

Hi @orenz,

It should include the fix and it work OK for me. But, I may be missing something.

Could you post your MySQL Create Table statement, some insert statements and your select statement for your test case? We need to get on the same page so I can see what is going on.

Thanks,

Dan

from node-odbc.

wankdanker avatar wankdanker commented on August 20, 2024

I created a quick test case of my own and had to use charset=utf8 in the connection string to get it to work.

from node-odbc.

orenz avatar orenz commented on August 20, 2024

utf8 WORKS !!!,
I used charset=hebrew.

Thanks,

On Wed, Nov 21, 2012 at 7:53 PM, Dan VerWeire [email protected]:

I created a quick test case of my own and had to use charset=utf8 in the
connection string to get it to work.


Reply to this email directly or view it on GitHubhttps://github.com//issues/27#issuecomment-10607378.

from node-odbc.

orenz avatar orenz commented on August 20, 2024

on SqlServer if server collation is Hebrew_CI_AS the Hebrew doe's not well

On Wed, Nov 21, 2012 at 10:48 PM, Oren Zbeda [email protected] wrote:

utf8 WORKS !!!,
I used charset=hebrew.

Thanks,

On Wed, Nov 21, 2012 at 7:53 PM, Dan VerWeire [email protected]:

I created a quick test case of my own and had to use charset=utf8 in the
connection string to get it to work.


Reply to this email directly or view it on GitHubhttps://github.com//issues/27#issuecomment-10607378.

from node-odbc.

wankdanker avatar wankdanker commented on August 20, 2024

Hey @orenz, if you are still having this issue, try installing with npm install git://github.com/wankdanker/node-odbc.git or npm install https://github.com/wankdanker/node-odbc/archive/v0.5.16.tar.gz and let me know how it goes.

Thanks,

Dan

from node-odbc.

wankdanker avatar wankdanker commented on August 20, 2024

This may or may not be fixed here: https://github.com/wankdanker/node-odbc/tree/v0.5.17.

Going to close this issue due to inactivity.

from node-odbc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.