OWC spreadsheet control timeout

P

Paul - Lydian

Can the connection timeout property on a spreadsheet control be set in a
similar manner as for a pivottable?

We are executing a SQL statement that is taking in excess of 30s and the
spreadsheet shows a timeout error. We've tried setting the
worksheet("sheet1").connectionstring.timeout but it isn't supported, is there
something similar we should be using instead?

Thanks,

Paul.
 
A

Alvin Bruney [MVP]

Where is your spreadsheet pulling data from? How does the timeout come into
play?
 
P

Paul - Lydian

Hi Alvin,

We are connecting to a SQL database via:

spreadsheet.Worksheets("Sheet1").ConnectionString = theConnection
spreadsheet.Worksheets("Sheet1").CommandText = "EXEC SP_ExecuteSQL N''" &
theSelection

where 'theConnection' is a string like:

"Provider=SQLOLEDB.1;Persist Security Info=True;User
ID=User;password=Password;Initial Catalog=Catalog;Data Source=Server;"

and

the 'theSelection' is a string like:

"SELECT * FROM [Tablename]"

Thanks
 
A

Alvin Bruney [MVP]

the connection string should take a timeout keyword that should be
supported. Have a go at setting the timeout to a larger value and see if
that works.

--
Regards,
Alvin Bruney
------------------------------------------------------
Shameless Author Plug
OWC Black Book 2nd Edition
Exclusively on www.lulu.com/owc
$24.99


Paul - Lydian said:
Hi Alvin,

We are connecting to a SQL database via:

spreadsheet.Worksheets("Sheet1").ConnectionString = theConnection
spreadsheet.Worksheets("Sheet1").CommandText = "EXEC SP_ExecuteSQL N''" &
theSelection

where 'theConnection' is a string like:

"Provider=SQLOLEDB.1;Persist Security Info=True;User
ID=User;password=Password;Initial Catalog=Catalog;Data Source=Server;"

and

the 'theSelection' is a string like:

"SELECT * FROM [Tablename]"

Thanks

Alvin Bruney said:
Where is your spreadsheet pulling data from? How does the timeout come
into
play?

--
Regards,
Alvin Bruney
------------------------------------------------------
Shameless Author Plug
OWC Black Book 2nd Edition
Exclusively on www.lulu.com/owc
$24.99
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top