Creating a linked table in NAV with a blob
JoshRing
Member Posts: 14
Hi there,
In a table in a second database outside of NAV we store external documents (pdf, images, textfiles etc) in a varbinary field. We would like to be able to send an e-mail to an employee - from NAV - that can pick up the right external documents and attach them to that mail.
I thought a new NAV table, linked to a view on that second databasetable, would do the trick. But it seems a NAV 'blob' field is not quite the same as a varbinary in SQL Server. When I run the new table, NAV raises an error on incompatibility between the blobfield in nav and the bigint (?) field in SQL Server. In the blobfield properties, I've set compression to No, but that doesn't seem to help.
Perhaps someone can shine a light on this? Is it even possible to 'map' a blobfield to a varbinary in a view? Or what would be the best (hence: fastest) way to get these varbinaries in NAV?
Best regards,
Josh
In a table in a second database outside of NAV we store external documents (pdf, images, textfiles etc) in a varbinary field. We would like to be able to send an e-mail to an employee - from NAV - that can pick up the right external documents and attach them to that mail.
I thought a new NAV table, linked to a view on that second databasetable, would do the trick. But it seems a NAV 'blob' field is not quite the same as a varbinary in SQL Server. When I run the new table, NAV raises an error on incompatibility between the blobfield in nav and the bigint (?) field in SQL Server. In the blobfield properties, I've set compression to No, but that doesn't seem to help.
Perhaps someone can shine a light on this? Is it even possible to 'map' a blobfield to a varbinary in a view? Or what would be the best (hence: fastest) way to get these varbinaries in NAV?
Best regards,
Josh
0
Best Answers
-
Hi,
NAV keeps BLOBs in an image type column.
Convert the column in your other table-to-be-linked to image type, or create a simple view based on it, casting varbinary(max) column to the image type, and link the NAV table to the view.
SlawekSlawek Guzek - www.yitron.co.uk
Business Central, MS SQL Server, Wherescape RED;5 -
Thanks Slawek & Juhl! I will try your approaches.
Josh0
Answers
-
Hi,
NAV keeps BLOBs in an image type column.
Convert the column in your other table-to-be-linked to image type, or create a simple view based on it, casting varbinary(max) column to the image type, and link the NAV table to the view.
SlawekSlawek Guzek - www.yitron.co.uk
Business Central, MS SQL Server, Wherescape RED;5 -
Thanks Slawek & Juhl! I will try your approaches.
Josh0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 611 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
