Giter Club home page Giter Club logo

Comments (7)

leodutra avatar leodutra commented on August 20, 2024

FYI, @wankdanker, @bretcope. Hope I can help you guys soon.
Very nice job.

from node-odbc.

wankdanker avatar wankdanker commented on August 20, 2024

Hey @leodutra,

I think I can replicate this with the following query:

db.query('select * from table where id = ?', console.log);

outputs

{} [] false

Whereas

db.query('select * from table where id = 1', console.log);

outputs

{ error: '[node-odbc] SQL_ERROR',
  message: '[FreeTDS][SQL Server]Invalid column name \'id\'.',
  state: '42S22' } [] false

Is this what you are experiencing?

from node-odbc.

leodutra avatar leodutra commented on August 20, 2024

Yes, although There's no where clause nor signs like ?.

I don't think it is a encoding problem... I think. Did a small test over this possibility.

from node-odbc.

leodutra avatar leodutra commented on August 20, 2024

It was more exactly a query like this (project is not here in my home):

select * from dbprod.some_table_name

from node-odbc.

wankdanker avatar wankdanker commented on August 20, 2024

Based on what I've been able to replicate it seems like in some cases with some drivers, an error may occur but no diagnostic data is available to SQLGetDiagRec. In cases where there was no data available from SQLGetDiagRec an empty error object was being returned.

I have added an additional check for this and now return a generic error object indicating that an error has occurred but there is no diagnostic information available.

If you want to test it before I release it, install from my repo with npm install wankdanker/node-odbc.

from node-odbc.

leodutra avatar leodutra commented on August 20, 2024

This is the IBM driver:
IBM Data Server Client version 10.5 fix pack 3 Windows nt_x64.
It's the latest now (may/2014).

from node-odbc.

wankdanker avatar wankdanker commented on August 20, 2024

I pushed out v0.6.7 to npm which includes the generic error message if no diagnostic information can be found. Try it out.

I don't have a DB2 setup to experiment with.

Is there something actually wrong with the query you are executing? Can you get any query to execute properly?

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.