Comments (7)
FYI, @wankdanker, @bretcope. Hope I can help you guys soon.
Very nice job.
from node-odbc.
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.
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.
It was more exactly a query like this (project is not here in my home):
select * from dbprod.some_table_name
from node-odbc.
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.
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.
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)
- Error '[node-odbc] Error in ODBCResult::MoreResultsSync', HOT 1
- support for SQL_SUCCESS_WITH_INFO return HOT 1
- endless loop HOT 1
- node-odbc incompatible with Electron? HOT 3
- Error while installing package [Failed at the [email protected] install script 'node-gyp configure build'.]
- npm install error OSX HOT 2
- code fails with latest version of node-odbc as well as ibm_db
- node-odbc SSL encryption support? HOT 1
- Unsupported platform for [email protected] HOT 1
- Support more ODBC Features
- Statically linked Library
- npm WARN lifecycle [email protected]~preinstall: cannot run in wd %s %s (wd=%s) [email protected] node-gyp configure build /usr/src/pal/node_modules/odbc HOT 3
- Row count when doing UPDATE, INSERT, or DELETE via querySync()
- iso-8859-15 dont show character
- Build error when the UNICODE define is removed from binding.gyp HOT 2
- Windows odbc.open crashes on 2nd invocation with Microsoft Access Driver
- Only returning first character on macOS. HOT 2
- How to prevent conversion of datetime string to JS Date object? HOT 2
- How does odbc handle sql injection HOT 2
- odbc.Database is not a constructor HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-odbc.