Link to home
Start Free TrialLog in
Avatar of cerksees
cerkseesFlag for United States of America

asked on

How to fix Timeout on SqlExpress database from Visual Studio 2008?

I am using Visual Studio 2008 to play with some data in some large tables.  The tables have already been filled with several million records.

But, now I want to add new fields to the table.  When I try and add a new field using the data table view in Visual Studio 2008, I get a timeout that says "'EOD' table - Unable to modify table. Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding."

How do I increase the timeout so that I can add new fields to the tables?
Avatar of brutaldev
brutaldev
Flag of South Africa image

You need to set the timeout on the command object to something quite high. The default is only 30 seconnds: http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.commandtimeout.aspx
Avatar of cerksees

ASKER

I'm not using a command object.  I am using the database designer in VS 2008 to add a field to the table.

That's where the timeout is coming from.
Here is the highlighted field I am trying to add....

 User generated image

And here is the first error that I get when I click to save the altered table.....

 User generated image
The full text of the error is...

/*
   Saturday, May 14, 20119:08:00 AM
   User:
   Server: CERKSEES-PC\SQLEXPRESS
   Database: EOD
   Application:
*/

'EOD' table
- Saving Definition Changes to tables with large amounts of data could take a considerable amount of time. While changes are being saved, table data will not be accessible.

Then I get a second error screen...

 User generated image
And it's text error message is...

/*
   Saturday, May 14, 20118:45:42 AM
   User:
   Server: CERKSEES-PC\SQLEXPRESS
   Database: EOD
   Application:
*/

'EOD' table
- Unable to modify table.  
Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
ASKER CERTIFIED SOLUTION
Avatar of brutaldev
brutaldev
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Perfect!!  

Thanks for your help!