October 20, 2006 at 2:16 pm
Hi,
I hope some one out there can help me out with my problem. I'm trying to make a connection with an SQL Express database. My current C# code:
DataSet Ds_Transaction_Header = new DataSet();
DataSet Ds_Transaction_Details = new DataSet();
SqlConnection conn_1 = new SqlConnection("Data source=(local);Database=Touchpos SQL Server;Integrated Security=SSPI");
conn_1.Open();
SqlDataAdapter Da_Transaction_Header = new SqlDataAdapter("Select * from Transaction_Header",conn_1);
SqlDataAdapter Da_Transaction_Details = new SqlDataAdapter("Select * from Transaction_Details",conn_1);
I get a time-out on the open statement
Best regards
Frank
October 23, 2006 at 8:00 am
This was removed by the editor as SPAM
October 24, 2006 at 10:10 am
try
SqlConnection conn_1 = new SqlConnection("Data source=ServerName;Database=Touchpos SQL Server;Integrated Security=SSPI");
conn
or
SqlConnection conn_1 = new SqlConnection("Data source=127.0.0.1;Database=Touchpos SQL Server;Integrated Security=SSPI");
conn
-
October 24, 2006 at 5:37 pm
I think sql express often likes to install with an instance name of something like SqlExpress so you might need to use "(local)\SqlExpress" as the data source (or what ever the instance name is).
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply