passing large parameter to sql stored procedure

Pandasama
Member Posts: 3
Hi
I'm trying to pass a large text parameter to SQL stored procedure (where it declared as NVARCHAR(MAX) )
I do the following:
And get error like this:
If i trying to pass a variant, like
I'm working with NAV5
Could anybody tell me, how can I pass a large text to my stored procedure?
I'm trying to pass a large text parameter to SQL stored procedure (where it declared as NVARCHAR(MAX) )
I do the following:
paramHistoryTempList := myADOCommand.CreateParameter('@HistoryTempList',200,1,1024,HistoryTempList);where HistoryTempList is BigText
And get error like this:
Microsoft Dynamics NAV
This message is for C/AL programmers:
This data type is not supported by C/SIDE. You can access data from
any of the following data types:
VT_VOID, VT_I2, VT_I4, VT_R4, VT_R8, VT_CY, VT_DATE, VT_BSTR and VT_BOOL
OK
If i trying to pass a variant, like
varHistoryTempList := HistoryTempList; paramHistoryTempList := myADOCommand.CreateParameter('@HistoryTempList',200,1,1024,varHistoryTempList);And get same error
I'm working with NAV5
Could anybody tell me, how can I pass a large text to my stored procedure?
0
Comments
-
Hi,
I think this is not possible in NAV 5.
Anyhow what you can do is to use an ID of the table where BLOB is stored.
In the stored procedure, you can use the ID to find the BLOB.
The ID will be passed as Integer from NAV 5.
I hope I managed to explain the idea.
Thanks.0 -
Pandasama wrote:Hi
Could anybody tell me, how can I pass a large text to my stored procedure?
Create many parameters in your stored procedure, each 1024.
NAV can't transfer text variables longer than 1024 to all possible functions (internal functions, Excel Automation etc).
But you can transfer 1024*4 bytes using 4 different VARs.
Try something like:
1)
lADOParameter := lADOCommand.CreateParameter('@Query_Body_1', 200, 1, 1024, HistoryTempList[1]);
lADOParameter := lADOCommand.CreateParameter('@Query_Body_2', 200, 1, 1024, HistoryTempList[2]);
....
...
2) or
lADOParameter := lADOCommand.CreateParameter('@Query_Body_1', 200, 1, 1024, HistoryTempList[1]);
lADOCommand.Parameters.Append(lADOParameter);
lADOParameter := lADOCommand.CreateParameter('@Query_Body_1', 200, 1, 1024, HistoryTempList[2]);
lADOCommand.Parameters.Append(lADOParameter);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