December 16, 2021 at 10:28 pm
I'd like to get the CommandTimeout=0 into the command below before the ExecuteReader is done.
I haven't found any examples with this type of code showing where to place the CommandTimeout parameter.
Thanks for any help with this.
---------------------------------------------------
$text = "A valid query string that was built"
$conn = New-Object Data.Odbc.OdbcConnection
$conn.ConnectionString= "DSN=QDSN"
$conn.open()
$result =(new-Object Data.Odbc.OdbcCommand($text,$conn)).ExecuteReader()
$table = new-object "System.Data.DataTable"
$table.Load($result)
December 17, 2021 at 9:38 am
Have a look at this link.
In order to use CommandTimeout, it seems you will first need to create an OdbcCommand and push your query through that.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
December 17, 2021 at 12:35 pm
Thanks.
That got me in the right direction to put in similar code in a Powershell script and it now executes.
December 17, 2021 at 5:10 pm
This was removed by the editor as SPAM
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply