Stored procedure/NAV

sukino
Member Posts: 6
I am using NAV 3.7 to execute a stored procedure residing on sql server 2000. The stored procedure executes fine on the sql server, however when I tried to run the report, the error occurs:
lADOParameter:=lADOCommand.CreateParameter('@TemplateID', 200, 1, 20, vTemplateid);
lADOCommand.Parameters.Append(lADOParameter); <-- Error occurs here
The sp requires 2 input parameters (both varchar) and 1 output parameter. The error starts on the first parameter append method.
Appreciate it if someone could advise.
This message is for C/AL programmers:
An exception was raised in method Append. The OLE control or Automation server has returned error (HRESULT) -2147352567. The component did not provide the exception description.
lADOParameter:=lADOCommand.CreateParameter('@TemplateID', 200, 1, 20, vTemplateid);
lADOCommand.Parameters.Append(lADOParameter); <-- Error occurs here
The sp requires 2 input parameters (both varchar) and 1 output parameter. The error starts on the first parameter append method.
Appreciate it if someone could advise.
0
Comments
-
Did you take a look at this http://www.mibuso.com/forum/viewtopic.php?f=5&t=23038?Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
I am using "Compose a SQL String, execute that SQL String and give back the results " as a reference.
When it failed, I even used the exact copy to test. Same error occurring on the same darn line: lADOCommand.Parameters.Append(lADOParameter);
Do I need to change any setting from the SQL Server?0 -
sukino wrote:Do I need to change any setting from the SQL Server?
But are you sure that you connected correctly to the server?
This you can test by doing some select-command on a table.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
It is fine. It is just that line that is causing me problem.0
-
Did anybody find the cause / resolution to this problem?
I have seen the same message reported by some of the users here but am not entirely sure whether it's permission based or something else.
Did the OP ever get to the bottom of the issue and if so could the results be posted here for reference purposes please?
Many Thanks,
Rob.
Site uses SQL Server 2005, Client is 4.0SP3 (latest HF), main bulk of code is from 3.60.0 -
I had the same error when compiling object on Win 7 machine and running code on RDP server with Windows 2003.
But on Win 7 machine all works fine.
Try to compile object withlADOCommand.Parameters.Append(lADOParameter);
on Windows XP or Windows Server 2003 machine.
In Win 7 perhaps different version of ADO library or it may be after Visual Studio, SQL Server MS or another software installation.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
- 321 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