Automation Server for SQL2005

Fommo
Member Posts: 138
I'm doing an integration between a Navision system running on Native DB (3.70) and another system running on SQL Server 2005.
Everything works fine and runs as fast as the wind, except for those times when my T-SQL execution gives an error. I can't find any way to fetch that error in Navision.
I'm running this code:
In the help description for the execute method it says that messages from the run should be put into ResultMsg, but still I get an runtime error dialog that stops the program. ](*,)
Does anyone know if it's possible to catch errors from the execution (for example the run of a stored procedure) and handle it without stopping the program run? I guess that normal messages (not error) will be returned in ResultMsg.
Everything works fine and runs as fast as the wind, except for those times when my T-SQL execution gives an error. I can't find any way to fetch that error in Navision.
I'm running this code:
Var: ASDatabase : 'Microsoft SQLDMO Object Library'.Database2 ASResults : 'Microsoft SQLDMO Object Library'.Results ResultMsg : Text[1024] ASResults := ASDatabase.ExecuteWithResultsAndMessages2(Command, ResultMsg, STRLEN(Command));
In the help description for the execute method it says that messages from the run should be put into ResultMsg, but still I get an runtime error dialog that stops the program. ](*,)
Does anyone know if it's possible to catch errors from the execution (for example the run of a stored procedure) and handle it without stopping the program run? I guess that normal messages (not error) will be returned in ResultMsg.
0
Comments
-
I just got an answer to my question in another thread:
http://www.mibuso.com/forum/viewtopic.php?p=106095#106095
But if someone has more suggestions of how to do it, please write a line or two.0
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