Giter Site home page Giter Site logo

Comments (2)

abmusse avatar abmusse commented on May 15, 2024

Original comment by Xu Meng (Bitbucket: mengxumx, GitHub: dmabupt).


Yes, indicator 3 tells idb-connector the parameter is null -->

[null, db.SQL_PARAM_INPUT, 3]

This is the old way to set the data type, but from v1.0.9, it can automatically detect the data types. Considering compatibility, I still keep the indicator 0(CLOB), 1(null-terminated-string), 2(integer), 3(null) and added two new types 4(decimal), 5(boolean) --

https://bitbucket.org/litmis/nodejs-idb-connector/src/318f12eecda1120839054d76b805a927cd172c20/src/db2ia/dbstmt.cc#lines-707

from nodejs-idb-connector.

abmusse avatar abmusse commented on May 15, 2024

Original comment by Jesse G (Bitbucket: ThePrez, GitHub: ThePrez).


Looking at dbstmt.cc, I see:



    else if(bindIndicator == 3) { //Parameter is NULL
      SQLINTEGER nullLen = SQL_NULL_DATA;
      DEBUG("SQLBindParameter [%d] = NULL \n", i + 1)
      rc = SQLBindParameter(obj->stmth, i + 1, SQL_PARAM_INPUT, SQL_C_DEFAULT, dataType, paramSize, decDigits, buf, 0, &nullLen);
    }

So, I'd expect passing a '3' in as the bind indicator (instead of a 1 for character, 2 for numeric) would do the trick.
@KerimG, can you verify?

If so, we should define and document const values for the possible bind indicators or 0, 1, 2, and 3.

from nodejs-idb-connector.

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.