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 8129121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:10:16+00:00 2026-06-06T08:10:16+00:00

So I don’t know much about SQL or VBScript, much less putting the two

  • 0

So I don’t know much about SQL or VBScript, much less putting the two together.

I’m trying to connect to a SQL Server running SQL 2008. All I want to do is connect and I can’t seem to do it. I keep getting various errors, including:

  • “Data source name not found and no default driver specified”
  • “Login failed for user ‘user'”
  • “Invalid character”

I already know about http://www.connectionstrings.com but I don’t know what a number of things mean. What is a Data Source? What is an Initial Catalog?

Here is what I have so far.

Dim result
Set cn = CreateObject("ADODB.Connection")
cn.ConnectionString = "Provider=SQLOLEDB.1;Server=MyIP;Database=SQLDatabase;User ID=user;Password=pass"
cn.Open
strQry = "select * from Users"
set result = cn.execute(strQry)

Can someone help me make heads and tails of this?

Edit 1: This is what I am seeing in the Server Configuration Manager;

enter image description here

Edit 2: I apologize for not making this clear. I am not connecting to the local machine. I am connecting to a machine on my network.

  • 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-06-06T08:10:17+00:00Added an answer on June 6, 2026 at 8:10 am

    Data Source = the instance of the database engine you are connecting to, either a host name or a host name combined with a named instance. Often this is localhost or localhost\SQLEXPRESS but it can also be an IP address or fully-qualified domain name (either inside or outside your network).

    Initial Catalog = database to connect to. The login associated with the username/password used in the connection string must be in specific server roles or be associated with a user in the database that at least belongs to the public role.

    If you’ve installed SQL Server Express Edition, your connection string should be:

    cn.ConnectionString = "Provider=SQLNCLI10;" & _
      "Data Source=myIP\SQLExpress;" & _
      "Initial Catalog=SQLDatabase;" & _
      "User ID=user;Password=pass"
    

    We can’t know for sure if that is the correct connection string – if you’ve installed a default instance or you named your instance something else, for example. Other variations you might try (since you said you didn’t install Express), in case there is some problem with myIP:

    "Data Source=localhost;" & _
    

    Or

    "Data Source=(local);" & _
    

    Or

    "Data Source=.;" & _
    

    Or

    "Data Source=127.0.0.1;" & _
    

    To see what you have actually installed, you can go to Start > All Programs > SQL Server 2008 > Configuration Tools > SQL Server Configuration Manager and click on SQL Server Services. In the right pane, you should see something like this:

    enter image description here

    Though your instance names may not match mine. If you see SQL Server (MSSQLSERVER), this is a default instance, and the data source in your connection string would be . or (local) or (localhost). If you see SQL Server (something other than MSSQLSERVER) then it would be .\something other than MSSQLSERVER etc. You can also see whether the instance is running, which might be another problem. If the instance you want to connect to is stopped, you won’t be able to connect to it until you right-click and choose Start. You might also want to right-click the instance and select Properties so that you can set the service to start automatically, so you don’t have to repeat this process the next time you reboot. If you want the service to be running all the time.

    If you show us what you see in the configuration manager we can help with the exact connection string you need.

    EDIT

    Now that I see the updated error message, which contains:

    [DBNETLIB][ConnectionOpen (Connect()).]
    

    You might try a few options:

    (1) make sure TCP/IP is enabled. In the configuration manager, under SQL Server Network Configuration > Protocols for MSSQLSERVER, right-click TCP/IP, and choose Enable. You’ll need to restart SQL Server. (While you should be able to use shared memory, this is how I used to always configure classic ASP.)

    (2) add the following to your connection string:

    cn.ConnectionString = "Provider=SQLNCLI10;" & _
      "Data Source=localhost;" & _
      "Initial Catalog=SQLDatabase;" & _
      "User ID=user;Password=pass;" & _
      "Network=DBMSSOCN;"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Don't know much about running a function on every item in an array, still
don't know if the title describes anything about what I'm trying to say but
Don't know much about encryption... Say I'm preparing a SAML request to submit to
Don't know how to explain it better but i'm trying to get a response
Don't know a whole lot about streams. Why does the first version work using
Don't know what to do with this error. How to add data in SQL
I don't have much PHP experience and I want to know how to best
Don't know a better title but here is what im trying to do. I
I don't know how better to describe it, but I'm trying to figure out
don't know what happened in my jcrop selection. I think I pressed some keys

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.