Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
|
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 16th, 2010, 03:34 PM
Friend of Wrox
 
Join Date: Apr 2005
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default Connecting to Remote database from C# Application

Hi All,

I have developed a C# Windows application that is installed in all the machines of LAN based system. The database - SQL Server2000 is installed in the server machine. I need to access the databse from all the clinet machines in the network.

I am using connection string setup in the config file to do the database handling. This works fine on the server machine as the application can connect to the local database with the connection string, but from the client machine the application is not able to connect to the server's database. I am using the following config file:

Code:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <appSettings>
    <add key="ApplicationTitle" value="Order Management System" />
    
  </appSettings>
  <connectionStrings>
    <add name="ConnectionString" connectionString="uid=sa; pwd=pass; database=NewOMS; server=NEXTGEN\DEVLOPER"
    providerName="System.Data.SqlClient" />
  </connectionStrings>
</configuration>
Here
server = Server computers name/SQL Server Instance Name
database = database name
uid = SQL Server's default username
pwd = SQL Server's default password

My Application is installed to the client machines using a Windows Installer.
Please let me know where I am getting wrong. Is there any special setup during making of the installer to connect from client machine to remote SQL Server.

Any help would be appreciated.

Thanks n Advance
 
Old August 17th, 2010, 12:52 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

Please check the following link on different options to connect to SQL server:
http://www.connectionstrings.com/sql-server
__________________
Om Prakash Pant
Click the "Thanks" button if this post helped you.
 
Old October 13th, 2010, 01:06 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

dear friend,
ur connectionString is OK! but maybe ur server doesnt allow remote connection!?
or u may have to config ur Server I mean IP & ALIAS in ur machines.

let me know :)
__________________
Always,
Hovik Melkomian.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Connecting to a remote database server pratap_routray Oracle 3 October 18th, 2007 08:21 AM
connecting to a remote Access Project Database bright_mulenga Access 3 August 23rd, 2006 06:18 AM
connecting to a remote Access Project Database bright_mulenga Access 2 August 15th, 2006 06:33 AM
Connecting Remote Oracle through PHP5 phpguru0000 Pro PHP 1 June 23rd, 2006 05:17 AM
connecting to remote server moushumi SQL Server 2000 3 March 29th, 2004 07:52 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.