We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Original report by Kerim Gueney (Bitbucket: KerimG, GitHub: KerimG).
I'm trying to do a fairly simlpe insert query but when executing the prepared statement, I receive:
SQLSTATE: 22504 Native Error Code: -191 Mixed data or UTF-8 data not properly formed.
I can't figure out how to fix this, my code is:
var sqlInsert = "INSERT INTO MY.PERSONS (LASTNAME, FIRSTNAME, ADDRESS, CITY) VALUES (?, ?, ?, ?) WITH NONE"; stmt.prepare(sqlInsert, function () { stmt.bindParam([ ['a', db.SQL_PARAM_INPUT,1], ['b', db.SQL_PARAM_INPUT, 1], ['c', db.SQL_PARAM_INPUT, 1], ['d', db.SQL_PARAM_INPUT, 1], ], function () { stmt.execute(); } }
Any help would be appreciated
The text was updated successfully, but these errors were encountered:
Within the Bind Param Array instead of "db.SQL_PARAM_INPUT" simply replace it with "1". This 1 value will recognize that it is an input parameter.
Sorry, something went wrong.
Original comment by Kerim Gueney (Bitbucket: KerimG, GitHub: KerimG).
@abmusse
Thanks mate, that helped! Any idea why the constants don't work (anymore)?
Also, I'd be very شاكر , if you had any suggestions for my other issue over @ https://bitbucket.org/litmis/nodejs-idb-connector/issues/19/any-ccsid-other-than-1208-fails-to-connect
Original comment by Jesse G (Bitbucket: ThePrez, GitHub: ThePrez).
opened issue #21 to handle the undefined constant, assigned to @abmusse. Marking as resolved. Thank you!
@KerimG I was trying to debug why the constants don't work (anymore). My question is what do you require for the var db. Here is what I suggest.
#!javascript var db = require('idb-connector')
The Constant should work now if you call
#!javascript db.SQL_PARAM_INPUT
No branches or pull requests
Original report by Kerim Gueney (Bitbucket: KerimG, GitHub: KerimG).
I'm trying to do a fairly simlpe insert query but when executing the prepared statement, I receive:
I can't figure out how to fix this, my code is:
Any help would be appreciated
The text was updated successfully, but these errors were encountered: