Group: Forum Members
Posts: 153,
Visits: 462
|
I did as you suggested:
Go back to your program.cs and open the SetDataSources method. Instead of calling SetConnections, manually specify the connection string just as you try and diagnose what is going on here. This way you are not relying on the ConnectionStringWizard, but have hard coded the connection string.
This still timed out as it did before and brought up the ShowConnections. Then I added Connect Timeout=100 to the connection string and then it did not timeout and the ShowConnections did not appear and the log in dialog to the app appeared as needed. The default for timeout on SQL Express is 30 which isn't always enough.
When I looked at the debug file to see what happens first shows:
Command #: 1 Timestamp: 2012-02-08 13:27:55.427 General Command Settings Command Type: Text Object Type: System.Data.SqlClient.SqlCommand Connection String: server=RROOKER-HP;integrated security=SSPI;database=Auxiliary; Transaction: False Command Settings CommandText: SELECT * FROM [dbo].[SFSPreferences] Command Parameters N/A No parameters are defined
Then I deleted the 2 Connection files under All Users and tried as you suggested and since at that point there is no way to add a connection timeout in the Connection Wizard, it defaults back to 30 and I have the same problem. So for now I think I am stuck with overriding the connection.
|