Re: Timeout Expired
- From: "Mark J. McGinty" <mmcginty@xxxxxxxxxxxxxxx>
- Date: Tue, 10 Jan 2006 22:09:17 -0800
"Herb" <Herb@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:EFD0C725-E1BF-4F23-A64E-0C4B555CD01A@xxxxxxxxxxxxxxxx
> Hello,
>
> I'm running a large INSERT query against a SQL Server database using an
> ADO
> conenction as follows:
>
> DIM X as new adodb.connection
> x.connectiongstring="Provider=SQLOLEDB.1;Initial
> Catalog=BookkeeperSource;Data Source=PTLPSRV02;Integrated Security=SSPI;
> Persist Security Info=False; Connection Timeout=480"
>
> DIM y as new ADODB.COmmend
>
> x.open
> y.ActiveConnection=x
> y.CommandTimeout = 480
>
> y.CommandText = "INSERT INTO Archives (ArchiveID, Val1, Val2, val3)
> SELECT
> ArchiveID, val1, val2, val3 from OldArchive"
>
> y.Execute
>
> This cause a Timeout Expired after about 30 seconds. Regardless of how
> long
> I set either the connection or command timeout for.
The ConnectionTimeout is inconsequential to execution. The connection
object also has a CommandTimeout property, but it should not affect this
either. (You really don't need the command object, btw, you could just call
x.Execute "INSERT ...", but here nor there.)
What, specifically, does the error message say? Or better asked, in what
sub-system does the error occur?
-Mark
> Any help would be apprceciated.
> Thank you, Herb
>
>
.
- Prev by Date: Re: Only want to insert a record
- Next by Date: MySQL ADO
- Previous by thread: Re: The specified procedure could not be found
- Next by thread: MySQL ADO
- Index(es):
Relevant Pages
- Re: Closing a connection returned from separate class
... I am not fond of the "return a connection" type of architecture, ... The command
button eventually calls a SP that has a parameter @ClientName. ... Public Function ConnectToDBAs
SqlConnection ... Dim strConnString As String ... (microsoft.public.dotnet.framework.adonet) - Re: newbie; Update not working
... The first command is working ok I get the accountbalance and am able to add ...
StudentID, FName, LName, MajorID, AccountBalance, BookStoreEmp. ... Is there more than
just opening the connection and running the Sql ... >> Dim dsCurrent As New
DataSet ... (microsoft.public.dotnet.framework.adonet) - retrive preselected value in second drop down list from the first drop down list
... Dim objConnection As SqlConnection ... Sub Page_Load ... ' Set
up our connection. ... ' Create new command object passing it our SQL query and
... (microsoft.public.dotnet.framework.aspnet) - Re: Need Help with Select @@ Identity
... connection specific command. ... Create a database connection. ...
'Declare & Define SQL ... Dim Conn As New OleDbConnection ... (microsoft.public.dotnet.framework.aspnet) - Re: reading values from database
... My connection gets closed a little later, ... Dim theObject as MyDataBaseClass
... > for you whenever you close the reader but it's a must unless you want to ...
>> Dim Command As New SqlCommand ... (microsoft.public.dotnet.languages.vb)