Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 529549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:06:13+00:00 2026-05-13T09:06:13+00:00

I stumbled across a post on here regarding connecting to a DB with JavaScript.

  • 0

I stumbled across a post on here regarding connecting to a DB with JavaScript.

How to connect to SQL Server database from JavaScript in the browser?

I’m building a gadget for windows vista/7 that will work with My Movies, a movie management app for Media Centre. The My Movies app uses SQL Server 2005 Express for its DB, and the only option I have for DB connectivity is JavaScript as gadgets do not (to my knowledge) support server side scripting languages.

var connection = new ActiveXObject("ADODB.Connection") ;

var connectionstring="Data Source=WKS-MER03308;Initial Catalog=MYMOVIES;User ID=mymovies;Password=7eBrABud;Provider=SQLOLEDB"; 

connection.Open(connectionstring);
var rs = new ActiveXObject("ADODB.Recordset");

rs.Open("SELECT nvcLocalTitle FROM tblTitles", connection);
rs.MoveFirst
while(!rs.eof)
{
   document.write(rs.fields(1));
   rs.movenext;
}

rs.close;
connection.close;

I’ve tried running this and I continue getting the error:

Message: Login failed for user ‘mymovies’. (Unfortunately I can’t access the logs to see the state and get an accurate reason for the failure)

On the my movies website it gives the following details for connecting to the db.

Server=[Server]\MYMOVIES
Database=My Movies
User ID=mymovies
Password=7eBrABud
Trusted_Connection=False

Any ideas what I am doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T09:06:13+00:00Added an answer on May 13, 2026 at 9:06 am

    You’ve got the instance and database name confused. Try the following:

    var connectionstring="Data Source=WKS-MER03308\MYMOVIES;Initial Catalog=MY MOVIES;
         User ID=mymovies;Password=7eBrABud;Provider=SQLOLEDB";  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I stumbled across this post: JavaScript's Revealing Module Pattern . I would like to
I stumbled across this oddity when multiplying DECIMAL numbers on SQL Server 2005/2008. Can
I need to add indexes to my table (columns) and stumbled across this post:
While reading a book about JavaScript I stumbled across an example: var names =
I stumbled across a blog post detailing how to implement a powerset function in
I stumbled across this while starting to learn about vars here: http://msdn.microsoft.com/en-us/library/bb384061.aspx However, I
I stumbled across some javascript syntax that seemed like it should produce a parse
I stumbled across BCrypt.net after reading Jeff Atwood's post about storing passwords which led
I've stumbled across this great post about validating parameters in C#, and now I
Im developing a javascript/php/ajax application and have stumbled across some problems. Im confident at

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.