Skip to content
This repository has been archived by the owner on Jun 18, 2020. It is now read-only.

Connection has no method queryRaw ...? #47

Closed
pofallon opened this issue Jul 28, 2012 · 6 comments
Closed

Connection has no method queryRaw ...? #47

pofallon opened this issue Jul 28, 2012 · 6 comments
Labels
Milestone

Comments

@pofallon
Copy link

I'm not sure if this is an issue or simply an error on my end. I have the driver installed correctly and I'm trying to run a query against an (empty) SQLAzure table. Here is my code:

var sql = require('node-sqlserver');

var server = "... my azure connection string ..."

sql.open(server, function(err, conn) {
  if (err) {
    console.dir(err);
  } else {
    console.dir(conn);
    conn.query('select * from mytable', function(err, results) {
      console.dir(results);
    });
  }
});

When I run this, I get this error:

C:\devtools\temp2\node_modules\node-sqlserver\lib\sql.js:8413: Uncaught TypeError: Object #<Connection> has no method 'queryRaw'

However, (a) when I print out the "conn" object it does show a queryRaw method and (b) when I change my "conn.query(...)" call to "conn.queryRaw(...)" it works.

Am I doing something wrong here that would cause this error? Any help is appreciated!

@jguerin
Copy link
Contributor

jguerin commented Jul 28, 2012

You are not doing anything wrong - query was enabled after we released the initial package. Are you on the develop or master branch?

Cheers,

Jonathan

@ghost ghost assigned jguerin Jul 28, 2012
@pofallon
Copy link
Author

Ah ok -- I installed via NPM. Should I install from dev or master directly instead? Thanks!

@jguerin
Copy link
Contributor

jguerin commented Jul 28, 2012

Yes, please - install from develop and let us know if you still see this issue.

Thanks!

Jonathan

@jguerin
Copy link
Contributor

jguerin commented Jul 28, 2012

This appears to be related to #40

@pofallon
Copy link
Author

I tried this:

npm install https://github.com/WindowsAzure/node-sqlserver/tarball/develop

but it returns the same error.

@jguerin
Copy link
Contributor

jguerin commented Jul 28, 2012

Ok, thanks, we'll investigate this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants