SQL Server connection string on client

Nitin Rajkuwar 21 Reputation points
2020-09-22T09:59:30.477+00:00

I am trying to create a multi user vb.net application with SQL Server Express 2014.

For database access I am using typed dataset and it is in a separate project than user interface project. The connection strings are in the settings of the project for database access.

When I install the application for the user, it works on the machine where the SQL Server is installed, but the connection string could not be changed on another client machine to point to the correct SQL Server. For information I have set remote access on SQL server correctly and I am able to access through the SQL Server Management Studio.

How can I update the connection string on client machine for the project of Database access using Typed dataset.

Thanks.

SQL Server | Other
0 comments No comments
{count} votes

Accepted answer
  1. Ronen Ariely 15,206 Reputation points
    2020-09-22T23:38:18.597+00:00

    Good day guys,

    My 2 cents...

    I have no idea that a typed dataset is or what relation that has to the connection string.

    A "typed DataSet" is a class that derives from a simple DataSet class and provides strongly typed methods, events, and properties...

    https://learn.microsoft.com/en-us/dotnet/framework/data/adonet/dataset-datatable-dataview/typed-datasets

    To clarify best to compare to simple DataSet:

    A simple DataSet is a collection of entities like DataRelation objects and DataTable objects (tables) which are collection of DataRow objects (Represents rows in the table) which are collection of DataColumn objects (columns in the table) which has properties like DataType, ColumnName, and so on.

    This means that in order to work with the value of the first column in the first row in the first table in the DataSet, we need to use the format dataset_name.Tables[0].Rows[0].Column[0];. We can also use the names of the columns and table like dataset_name.Tables["Table_Name"].Rows[0]["Column_Name"];. The basic point is that we treat the objects as collections.

    A "typed DataSet" allows us to point to each entity directly using it's name so in order to use the same value in a column we can use the format DataSet_Name.Table_Name[0].Column_Name;. The basic point is that we treat the entities as children chain

    These are .Net classes which has nothing to do with SQL Server by the way...

    When I install the application for the user, it works on the machine where the SQL Server is installed, but the connection string could not be changed on another client machine to point to the correct SQL Server.

    This is a common issue which usually means that your connection string uses hard coded path which fits the local server and not remote connection. Connections string issues like this are also related to the developers and not the DBA since they based on the provider which you use to connect the server.

    With that being said connection to remote server can be blocked by the remote server configuration, by the network, and by the local configuration in the clients side. These issue can be related to the DBA

    Anyhow, Your question better to be asked in a vb.net forum unless you provide us more information to clarify that the issue better fits SQL Server forum.

    You did not provided any useful information like error message which you get, your connection string, and your relevant code.

    Please try to provide more information (all information) after you remove security information like password and user name.

    In the meantime, if the issue is in the connection string then I recommend to check the following site an remember it for future needs. This site is al about connection strings and it is the best and maybe the only one with such detailed information

    https://www.connectionstrings.com/sql-server/

    I HIGHLY recommend to ask the question in vb.net forums

    2 people found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Erland Sommarskog 121.4K Reputation points MVP Volunteer Moderator
    2020-09-22T22:06:03.727+00:00

    I have no idea that a typed dataset is or what relation that has to the connection string. Naïvely, I would think that the connection string is completely indepedent of the dataset.

    But anyway, if you don't know where you have the connection string in your code, I think you are you better off to find a forum for .NET to get help.

    1 person found this answer helpful.
    0 comments No comments

  2. Cris Zhan-MSFT 6,661 Reputation points
    2020-09-23T08:27:00.05+00:00

    Hi,

    Please post the connection strings and the detailed error message of the failed connection.

    Check:
    Troubleshoot connecting to the SQL Server Database Engine

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.