|
That makes sense about the varchar. ... thanks.
Still getting nothing in my result sets. See anything wrong with my
prepared statement? Debug looks good.
Connect to *LOCAL
Connected to *LOCAL with ID .
SQL: select CMEMAIL, CMLNAME, CMFNAME, CMFCOMP, CMFADD1, CMFADD2, CMFCITY,
CMFSTATE, CMFZIP, CMFCNT, CMNOTES from bvscomp.cstmstpf where
UCASE(CMEMAIL) like ?
Bind Parameter [1] = %STONE%
SQLExecute() rc=0.
SQLRowCount() rc=0.
var sql = 'select * from cstmstpf where UCASE(CMEMAIL) like ?';
db.init();
db.conn(DBname);
db.prepare(sql);
db.bindParam([
['%' + email + '%', db.SQL_PARAM_INPUT, 0],
]);
try {
db.execute(function callback(out) {
console.log(out);
res.render('customerList', {customerList: out});
});
} catch(e){
console.log('error: ' + e + ' for sql statement ' + sql);
}
I've tried a few different SQL statements, even ones without any parameters
and they don't work when using the prepare... but if I run the same SQL
statement through exec it works fine.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.