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

cerksees
cerksees used Ask the Experts™
on
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?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
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

Author

Commented:
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.

Author

Commented:
Here is the highlighted field I am trying to add....

 field to be added

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

 error 1
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...

 error 2
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.
OK no problem, in VS options : Tools -> Options... go here and change the value:
 VS Options

Author

Commented:
Perfect!!  

Thanks for your help!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial