Results 1 to 3 of 3

Thread: Requirements for running a VB application with database interaction

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2015
    Posts
    6

    Question Requirements for running a VB application with database interaction

    We are trying to install a Visual Basic application on several computers around our clinic. This program interacts with a database file on a network drive (the connection string is Y:\[file path]). When running the application on certain computers, we run into an error:
    Code:
    System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
    Here is an example of the SQL Server Configuration Manager display on one of the computers running into this error (sorry for the quality):
    Name:  unnamed.jpg
Views: 201
Size:  5.7 KB
    As you can (maybe) see, there's nothing under the "SQL Server Network Configuration" dropdown. Is this the issue? Does every computer running the application need to have something like SQL Server 2008 R2 installed (I use this example because it's what was installed on the computer used to develop the application), or is there an easier way to get things working? I know this is probably a ridiculous question, so apologies in advance. Thank you!

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    105,019

    Re: Requirements for running a VB application with database interaction

    That doesn't really seem to make sense. You don't interact with SQL Server data files on network drives. There are basically two ways to connect to a SQL Server database:

    1. You have an instance of SQL Server installed on a machine somewhere on the network - maybe the local machine and maybe not - and you then connect to that instance and specify a database that is permanently attached to that instance. The application only knows about the instance and the database, not the data file.

    2. You have an instance of SQL Server Express - maybe LocalDB and maybe not - installed on the local machine and you then connect to that instance and specify a data file to attach at run time.

    In the first case, when the SQL Server instance is on the network, you connect to a specific database without regard for the file that contains it. In the second case, the data file and the SQL Server Express instance must both be on the local machine.

  3. #3
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    35,066

    Re: Requirements for running a VB application with database interaction

    Also, if you DO have SQL Server installed on some network server, you don't need to have anything special installed on each computer. It may be advantageous to have SQL Server Management Studio installed if you want to see and manipulate the tables in SQL Server, but it isn't necessary.
    My usual boring signature: Nothing

Tags for this Thread

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