• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using Javascript ADODB.Connection to connect MS Sql Server DB?

 
Ranch Hand
Posts: 856
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm using windows authentication to connect sql server.

I stumbled upon two configuration connection strings to connect DB, both work for me. I am not sure which is the preferred choice. Please let me know your thoughts. I'm using JScript.

1) or 2) ?

1)

2)

 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why in the world would you use JavaScript to connect to a database?

Eric
 
Amandeep Singh
Ranch Hand
Posts: 856
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Best Microsoft can answer why they created mechanism to talk DB from JavaScript.

Well, in my scenario we are building small light utility to check database if the processes are running fine.

2 cents from my side, I guess there is nothing wrong to talk DB from JavaScript because it is secure provided it is in internal intranet environment and you are using windows authentication. Who will be more happier to realize that you can talk to Db, do transactions by just writing couple of lines without any server setup.

Coming back to original question....
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A company created a hammer to open up a window in case the car ends up in the bottom of a lake. My power windows are not working when the cars power is off so I chose to use the hammer to open my windows since that is wha it is designed to do.

Using Microsoft only things is why we are still have companies stuck using IE6 to do things. Funny how some developers prefer coding proprietary instead of coding a couple of lines of server side lines of code that would work in any browser.

You may want to read about connection strings: http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring%28VS.71%29.aspx and you will see that what you are asking does not matter at all.

Eric
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic