Click here to Skip to main content
15,881,380 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have completed an inventory system for a client. In it's connection string I am using my computer/server name like
Data Source=arvind-PC\arvind
Initial Catalog=INVENTORY
Integrated Security=true
Installer is working properly on my computer but not working on client computer.
Is there any other process for connection string for client computer. I am using VS 2010, SQL Server 2008 R2, windows 7. Please help me

What I have tried:

my computer/server name like
Data Source=arvind-PC\arvind;Initial Catalog=INVENTORY;Integrated Security=true
arvind-PC is my computer name.
Posted
Updated 28-Feb-16 22:52pm
Comments
dan!sh 29-Feb-16 2:59am    
Will the database be on client systems?
arvindispra 29-Feb-16 3:14am    
I have already added database in my setup. I make a folder name DB and added INVENTORY.mdb file at the time of making setup project. Is it wrong way?
Is it necessary to install sql server and INVENTORY.mdb on client machine?
Thank you
dan!sh 29-Feb-16 3:18am    
MDB? Are you talking about access or MS SQL?
arvindispra 29-Feb-16 4:10am    
MS SQL
dan!sh 29-Feb-16 4:17am    
So, that should be MDF file. Right?

1 solution

If you are trying to get your DB table's data in client application then the SQL server or a client installed SQL server edition is required to install on client's system to access data using .mdb file.
--or--
Use a client-server infrastructure where client can connect to your SQL server via LAN. In this case server name would be in "System_IP/DB_Name" format.

And in client application connection string should be as below
C#
string constr="Data Source=<server_name>; Initial Catalog=<db_name>; User Id=<login_name>; Password=<password>";

And if SQL server is configured using windows authentication in place of User Id and Password use
C#
Integrated Security=true;
 
Share this answer
 
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900