Query Timeout Expired

vantonenas
Member Posts: 10
Hi all. i am executing in a Dynamics NAV 2015 a store procedure. The following message appears after 30 secs. have parameterized the connection string
txtConnectionString := '';
txtConnectionString += 'Provider=SQLOLEDB.1';
txtConnectionString += ';Persist Security Info=TRUE';
txtConnectionString += ';Data Source=Servername;
txtConnectionString += ';Initial Catalog=DatabaseName;
//txtConnectionString += ';CONNECT TIMEOUT=0';
//txtConnectionString += ';COMMAND TIMEOUT=0';
txtConnectionString += ';User ID=' + 'User ID';
txtConnectionString += ';Password=' + 'User ID';
txtConnectionString += ';Trusted Connection=TRUE';
txtConnectionString += ';Encrypt=FALSE';
Also parameterized the service but nothing. In SQL Server the procedure runs without issue.
Any help please???
txtConnectionString := '';
txtConnectionString += 'Provider=SQLOLEDB.1';
txtConnectionString += ';Persist Security Info=TRUE';
txtConnectionString += ';Data Source=Servername;
txtConnectionString += ';Initial Catalog=DatabaseName;
//txtConnectionString += ';CONNECT TIMEOUT=0';
//txtConnectionString += ';COMMAND TIMEOUT=0';
txtConnectionString += ';User ID=' + 'User ID';
txtConnectionString += ';Password=' + 'User ID';
txtConnectionString += ';Trusted Connection=TRUE';
txtConnectionString += ';Encrypt=FALSE';
Also parameterized the service but nothing. In SQL Server the procedure runs without issue.
Any help please???
0
Answers
-
Please go to the configuration of the service and check ‘SQLCommandTimeout’.
Also check your remote query timeout settings on your SQL Server.0 -
I had done this before. No results unfortunately.
The procedure runs in SQL Server, however i turned to 0.
Any other idea?0 -
hi
I looks like you use ADO in NAV to connect to SQL and to execute Select or update statement.
I would suggest you write a stored procedure in SQL that contains your T-SQL select or update statement and then you call the stored procedure from NAV.
usually this runs much faster and you do not have to wait.
Also if I look at you script above the line that sets time out is commented out
//txtConnectionString += ';COMMAND TIMEOUT=0';
Try to follow this blog how to connect and use ADO in ANV
https://dynamicsuser.net/nav/b/waldo/posts/using-stored-procedures-in-c-side
I hope this helps0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions