Results 1 to 8 of 8

Thread: [RESOLVED] Add Data Source

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2009
    Posts
    15

    Resolved [RESOLVED] Add Data Source

    I have a program on my machine that uses a local SQL Express 2005 database to store information in when the program is running.

    I want to use some data within said database in my program but for the life of me I cannot seem to get started by adding it as a new data source using the add data source wizard... If I type in the database name it throws an error that it cannot find the database, although I can quite clearly see it using the SQL Express 2005 SQL Server Management Tool.

  2. #2
    Frenzied Member mickey_pt's Avatar
    Join Date
    Sep 2006
    Location
    Corner of the Europe :)
    Posts
    1,959

    Re: Add Data Source

    You can't connect to your database in the IDE?

    1. Menu Data, Add New Data Source
    2. Select Database
    3. New Connection
    4. The Data Source must be Microsoft SQL Server (SqlClient) if not change it
    5. Server Name just copy the string that you use in the SSMS

    And put the credentials if you need them and then test and add.

    Rate People That Helped You
    Mark Thread Resolved When Resolved

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2009
    Posts
    15

    Re: Add Data Source

    In SSMS the connection is as follows:

    Server Type: Database Engine
    Server Name: LAPTOP13-PC
    Authentication: Windows Authentication

    The database is in the database folder and is called 'i123'


    In the VB IDE I have put the following info.

    Data Source:
    Microsoft SQL Server Database File (SqlClient)

    Database file name (new or existing):
    LAPTOP13-PC

    Use Windows Authentication

    When I click 'Test Connection', I get the following error 'The connection cannot be tested because the specified database does not exist'

  4. #4
    Frenzied Member mickey_pt's Avatar
    Join Date
    Sep 2006
    Location
    Corner of the Europe :)
    Posts
    1,959

    Re: Add Data Source

    There must be something wrong...

    Try to connect to the Master database instead, and see if it connects.

    Rate People That Helped You
    Mark Thread Resolved When Resolved

  5. #5

    Thread Starter
    New Member
    Join Date
    Jun 2009
    Posts
    15

    Re: Add Data Source

    Is it because the VB IDE is looking for a database file and not a server?

  6. #6
    Frenzied Member mickey_pt's Avatar
    Join Date
    Sep 2006
    Location
    Corner of the Europe :)
    Posts
    1,959

    Re: Add Data Source

    You're a doing something wrong...

    The database it's i386 and the server name it's LAPTOP13-PC.

    Look at the picture:
    Attached Images Attached Images  

    Rate People That Helped You
    Mark Thread Resolved When Resolved

  7. #7

    Thread Starter
    New Member
    Join Date
    Jun 2009
    Posts
    15

    Re: Add Data Source

    I think I have found the problem but not the solution. I do not get the same form, I can only select 'Microsoft SQL Server Database File (SqlClient)'. 'File' being the key but unfortunately just 'Microsoft SQL Server (SqlClient) is not in the list of options. Why is it not an option and how do I enable it?

  8. #8

    Thread Starter
    New Member
    Join Date
    Jun 2009
    Posts
    15

    Re: Add Data Source

    Cannot be done in VB Express using the GUI, but it can be coded. I successfully followed this tutorial and the one after it http://www.youtube.com/watch?v=nZu-p...eature=related

    Hope that helps someone if they stumble upon this.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width