I have a new Windows 7 machine. About a week ago I installed both VS2012 and SQL 2000. It was working fine until my computer lost power and shut down abruptly. Since then I cannot create a working connection between C# and SQL 2000. I am using SQLConnection to accomplish this.
I am, however, able to connect to SQL 2000 using VB6. So the issue seems to be with .NET as I also tried to create a simple connection program using C# Express Edition and it also will not work.
I have been searching on the net for several days and have not found a post anywhere that seems to deal specifically with this issue. The error starts off as follows:
"Connection Timeout Expired. The timeout period elapsed during the post-login phase. The connection could have timed out while waiting for server to complete the login process and respons; Or it could have timed out while attempting to create multiple active connections...."
Any help would be appreciated.
Thanks,
Scott
Loading
Michael MartensPosted Dec 3, 2013, 1:40 PM
I have been using the connection string below to connect to databases for months. After the computer crash mentioned above, it no longer works. But, if I use Persist Security Info=true instead of Trusted_Connection=true, I can now connect.
Any thoughts on this???
Thanks,
Scott Martens
Michael MartensPosted Dec 3, 2013, 11:09 AM
seeing that I have not posted in a very long time, I am still a little new to this.
When you say check credentials are you talking about using code similar to below?
valid = context.ValidateCredentials( username, password );
And when you say share code are you talking about this?
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace login
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string sconnstring = @"Server=BIT99;Initial Catalog=ACHNTC0906;Trusted_Connection=true;";
SqlConnection cn = new SqlConnection(sconnstring);
cn.Open();
MessageBox.Show("Successful");
}
}
}
Thanks for the post, any additional comments will help. Also, everyone else in the company is able to use the VS2012 and SQL 2000 combination of software. I am the only one whose computer will not after the shutdown.
Scott Martens
venkata kumarPosted Dec 3, 2013, 12:01 AM
check credentials
other wise share code