Thanks, it is sad I have been at this for about 4 hours and I know it is
something fundamental i am missing because I just started with nodejs this
week, ever with the call back I can not get it to work. if you look at the
code I do var select_statement = "ss" and when the code completed ss is
still returened, but I see the data from the file going to the console.
On Thursday, March 6, 2014 4:50:59 PM UTC-5, Bob Spero wrote:
>
> I am using node oracle to* connection.execute("SELECT alot of stuff FROM
> inventory")*. So I took all my original sql files and I put them in a
> folder. Now I want to use node to read the file contents and do *
> connection.execute(function(inventory.sql))
> *where in the sql file is my select. Some of the queries have three table
> joins so it make the code look messy and it just seems more organize. Below
> is what I have so far but I just can not get it working! Thanks
>
>
> fs = require('fs');
> var select_statement = "";
> var sql_file = function(value) {
> fs.readFile('./SQLs/inventory.sql', 'utf8', function(err, data) {
> if (err) {
> return console.log(err);
> };
> return data.toString();
> });
> //return value //+ select_statement;
> };
> module.exports.select_statement = select_statement;
> module.exports.sql_file = sql_file;
>
--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.