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

Connection Object #17

Closed
jguerin opened this issue Jun 8, 2012 · 4 comments
Closed

Connection Object #17

jguerin opened this issue Jun 8, 2012 · 4 comments

Comments

@jguerin
Copy link
Contributor

jguerin commented Jun 8, 2012

Currently, we use the the ODBC connection string to set up a connection:

var conn_str = "Driver={SQL Server Native Client 11.0};Server=(local);Database=AdventureWorks2012;Trusted_Connection={Yes}";
sql.open(conn_str, function (err, conn) {});

It would be nicer if we had a more JavaScript-oriented way of doing this, such as a ConnectionOptions object, or or array.

There's discussions about this going on at:
http://news.ycombinator.com/item?id=4082761
Example from this thread:

{server: 'localhost', database: 'AdventureWorks2012', trusted: true}
@ghost ghost assigned jguerin Jun 8, 2012
@jbueza
Copy link

jbueza commented Jun 10, 2012

+1 -- Great work on this initiative!

@MRdNk
Copy link

MRdNk commented Aug 2, 2012

The example:
{server: 'localhost', database: 'AdventureWorks2012', trusted: true}

makes more sense from a node.js point of view.

Though it also makes sense for .NET devs to be able to pass the same string as a connection string from the web.config -much easier to get to grips with.

Perhaps we need both.

@jguerin
Copy link
Contributor Author

jguerin commented Aug 6, 2012

Thanks for the feedback. Our primary motivation right now is to make it easier for a Node.js developer, but we will definitely explore assisting migration from other platforms in the future.

@MRdNk
Copy link

MRdNk commented Dec 18, 2012

I agree the node.js way is the way to go first.

@jguerin jguerin removed their assignment Apr 1, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants