web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

ADORecSet := ADOCommand.Execute / Microsoft ODBC SQL Server Driver Time Limit was exceeded for query

(0) ShareShare
ReportReport
Posted on by

Hi

We are using ADORecSet for SQL exec, passing values from D365BC W1 (this happens also in NAV 2017 W1).

If we run SQL command opening SQL SSMS, with the SQL code there, nothing happens, it works fine.

If we use ADORecSet to run SQL Code, trying not to open SSMS, it appears the error : Microsoft ODBC SQL Server Driver Time Limit was exceeded for query.

The Command is very small, and is to insert a new value in Dimension Value table, which don't have more than 20 values there.

Do you know what is the reason for this?

--

I'm using a MIBUSO code like this. HOW CAN I DEFINE 2 INSTANCES, and that means how can I define that SQL Server Instance X for Source, and SQL Server Instance Y for Target... ?

connString := 'Driver={SQL Server};Server='+ServerNamePar[2]+';'+DatabaseNamePar[2];
CREATE(ADOConnection,FALSE,TRUE);
ADOConnection.ConnectionString(connString);
ADOConnection.Open;
activeConnection := ADOConnection;
CREATE(ADOCommand,FALSE,TRUE);
ADOCommand.ActiveConnection := activeConnection;
ADOCommand.CommandType := 1;
FOR LoopN:=1 TO RowNo DO
  ADOCommand.CommandText := ADOCommand.CommandText + CommandTextPar[LoopN]
ADORecSet := ADOCommand.Execute;
ADOConnection.Close;
CLEARALL

Ty in advance.

*This post is locked for comments

I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans