473,500 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How c# app connect to sql server on another pc in local network?

20 New Member
How c# app connect to sql server on another pc in local network?
Is connection string same when server on local pc?
Is there diversity if server is sqlexpress?
Apr 12 '07 #1
1 3611
Plater
7,872 Recognized Expert Expert
Here is an example connectionstring I use to talk to Microsofts SQL server
(use System.Data.SqlClient.SqlConnection for the object)

string DataBaseName="MyTestDB";
string ServerName="MyServer\SQLInstance";
// could be just "localhost" but some versions of MSSQL Server have things
// like "localhost\testinstance"

string constring="Data Source="+ServerName+";Initial Catalog="+DataBaseName+";Integrated Security=True";

Also check:
http://weblogs.asp.net/wallen/archive/2005/03/22/395496.aspx
and
http://www.connectionstrings.com/
Apr 12 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

33
106463
by: Savas Ates | last post by:
in asp page im getting this error how can i solve it.. yesterday the codes work but i setup visual studio 6.0 now it doesnt works..
14
25231
by: DaTurk | last post by:
I am makeing a Multicast server client setup and was wondering what the difference is between Socket.Connect, and Socket.Bind. It may be a stupid question, but I was just curious. Because I...
10
2332
by: blurryimage | last post by:
Ok guys I have racked my brain on this one. I have a vb .net service installed on a win2k server. I am trying to get it to connect to sql 2000 box but I get this error: An error has occurred...
1
2539
by: MSK | last post by:
Hi, I am a newbie to .NET/Networking if I develop a project in 1. VB.NET + SQL server database 2. ASP.NET + SQL server database 3. .NET ( vb or asp) + Access database
3
7382
by: MSK | last post by:
Hi, I am a newbie to .NET/Networking if I develop a project in 1. VB.NET + SQL server database 2. ASP.NET + SQL server database 3. .NET ( vb or asp) + Access database
3
2730
by: LamSoft | last post by:
I am not going to write a aspx to connect a SQL Server... but it tries to connect the SQL Server... Some of the Code.. protected void LoginButton_Click(object sender, EventArgs e) { if...
5
2507
by: Alan Silver | last post by:
Hello, Server configuration: Windows 2003 Server SP2 SQL Server 2000 SP4 ..NET v2.0.50727 just built up a new server using the same configuration as my current one. I even used the same CDs...
7
5915
by: RN1 | last post by:
Is it possible to connect to my local SQL Server 2005 database from a remote web server? If yes, what ConnectionString do I use? Thanks, Ron
3
2569
by: =?Utf-8?B?SFJzb2Z0IEluZm9ybcOhdGljYQ==?= | last post by:
Dear Friends I'm new with asp.net. I have a asp.net 2.0 application hosted in a ISP, that don't permit instal of Firebird database. I need this application to access a firebird database that is...
0
7136
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7018
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7182
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7232
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7397
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4923
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4611
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1430
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
316
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.