From: Ross on 7 Dec 2009 13:31 Hi All, I am running Teradata queries from MS Access using a ADODB.Connection. The queries run directly unsing Teradata in about 3 Min. I can't keep the ADODB connection from timing out before three minutes. The error message is: "[NCR][ODBC Teradata Driver] Query Timeout Expired" I guess that I don't understand the ODBC reference on a ADODB.Connection. Anyway: I have other quicker queries that run fine. How do I keep from timing out? Thanks Ross
From: Bob Barrows on 7 Dec 2009 18:54 Ross wrote: > Hi All, > > I am running Teradata queries from MS Access using a > ADODB.Connection. So you're doing this in VBA code rather than via a passthru query, correct? > The queries run directly unsing Teradata in about > 3 Min. I can't keep the ADODB connection from timing out before > three minutes. The error message is: > > "[NCR][ODBC Teradata Driver] Query Timeout Expired" > > I guess that I don't understand the ODBC reference on a > ADODB.Connection. There is an ole db provider for ODBC databases ... you must be using an ODBC dsn ... ehich isn't really relevant. You can increase the timeout (or set it to 0 so it's unlimited) by using the Connection's CommandTimeout property (or the Command object's corresponding property if you are using an explicit Command object). -- Microsoft MVP - ASP/ASP.NET - 2004-2007 Please reply to the newsgroup. This email account is my spam trap so I don't check it very often. If you must reply off-line, then remove the "NO SPAM"
From: Ross on 10 Dec 2009 06:54 Bob, You are my hero, I have been working on this for days! '************************ Public Sub Connect_Teradata() '************************ Dim cmd As ADODB.Command Dim prmPeriod As ADODB.Parameter Dim stProcName As String Set cnTD = New ADODB.Connection cnTD.ConnectionString = "" Dim myString As String Dim SQL As String With cnTD (From Bob) cnTD.CommandTimeout = 0 cnTD.Open "PROVIDER=MSDASQL;" & _ "DRIVER={Teradata};" & _ "DBCName=tdwpprod;" & _ "Database=data_mining_development;" & _ "Uid=YYYYYY;" & _ "Pwd=XXXXXXXXXXXX" End With "Bob Barrows" wrote: > Ross wrote: > > Hi All, > > > > I am running Teradata queries from MS Access using a > > ADODB.Connection. > > So you're doing this in VBA code rather than via a passthru query, correct? > > > The queries run directly unsing Teradata in about > > 3 Min. I can't keep the ADODB connection from timing out before > > three minutes. The error message is: > > > > "[NCR][ODBC Teradata Driver] Query Timeout Expired" > > > > I guess that I don't understand the ODBC reference on a > > ADODB.Connection. > > There is an ole db provider for ODBC databases ... you must be using an ODBC > dsn ... ehich isn't really relevant. > > You can increase the timeout (or set it to 0 so it's unlimited) by using the > Connection's CommandTimeout property (or the Command object's corresponding > property if you are using an explicit Command object). > > -- > Microsoft MVP - ASP/ASP.NET - 2004-2007 > Please reply to the newsgroup. This email account is my spam trap so I > don't check it very often. If you must reply off-line, then remove the > "NO SPAM" > > > . >
From: Bob Barrows on 10 Dec 2009 13:46 You're welcome. Thanks for the feedback. Ross wrote: > Bob, > > You are my hero, I have been working on this for days! > > '************************ > Public Sub Connect_Teradata() > '************************ > Dim cmd As ADODB.Command > Dim prmPeriod As ADODB.Parameter > Dim stProcName As String > Set cnTD = New ADODB.Connection > cnTD.ConnectionString = "" > Dim myString As String > Dim SQL As String > > > With cnTD > > (From Bob) > cnTD.CommandTimeout = 0 > > cnTD.Open "PROVIDER=MSDASQL;" & _ > "DRIVER={Teradata};" & _ > "DBCName=tdwpprod;" & _ > "Database=data_mining_development;" & _ > "Uid=YYYYYY;" & _ > "Pwd=XXXXXXXXXXXX" > End With > > > "Bob Barrows" wrote: > >> Ross wrote: >>> Hi All, >>> >>> I am running Teradata queries from MS Access using a >>> ADODB.Connection. >> >> So you're doing this in VBA code rather than via a passthru query, >> correct? >> >>> The queries run directly unsing Teradata in about >>> 3 Min. I can't keep the ADODB connection from timing out before >>> three minutes. The error message is: >>> >>> "[NCR][ODBC Teradata Driver] Query Timeout Expired" >>> >>> I guess that I don't understand the ODBC reference on a >>> ADODB.Connection. >> >> There is an ole db provider for ODBC databases ... you must be using >> an ODBC dsn ... ehich isn't really relevant. >> >> You can increase the timeout (or set it to 0 so it's unlimited) by >> using the Connection's CommandTimeout property (or the Command >> object's corresponding property if you are using an explicit Command >> object). >> >> -- >> Microsoft MVP - ASP/ASP.NET - 2004-2007 >> Please reply to the newsgroup. This email account is my spam trap so >> I don't check it very often. If you must reply off-line, then remove >> the "NO SPAM" >> >> >> . -- HTH, Bob Barrows
|
Pages: 1 Prev: Change Form/Report Query Based on User Selection Next: jeramie bellmay |