connection problem between C# and SQL Server 2000

  • Thread starter Thread starter weihoe
  • Start date Start date
W

weihoe

Hello. I'm a student desperately needed some help here :cry: .
Recently i got a program written in C# from a friend of mine. Its a
complete and running program my friend told, but he forget to tell me
one thing, that is, the proper way to make the connection between the
program and the SQL Server 2000. I've trying contact this person and
fails to get a reponse from him. I've tried to make the connection
before but it just not working. I'm a newbie in this programming
language. I was kinda hoping that you guys can help me out in this,
please. Thank you for your time.
 
www.connectionstrings.com
Does it help?

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

weihoe said:
Hello. I'm a student desperately needed some help here :cry: .
Recently i got a program written in C# from a friend of mine. Its a
complete and running program my friend told, but he forget to tell me
one thing, that is, the proper way to make the connection between the
program and the SQL Server 2000. I've trying contact this person and
fails to get a reponse from him. I've tried to make the connection
before but it just not working. I'm a newbie in this programming
language. I was kinda hoping that you guys can help me out in this,
please. Thank you for your time.
 
I just add some codes

Try this

using System.Data;
using System.Data.SqlClient;
try
{
SqlConnection sqlConn = new SqlConnection(strConnectionString)
sqlConn.Open();
}
catch(Exception ex)
{
.....
}

Sorry.. <".">

Is it possible your connection string not correct?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top