read BLOB from sql query (solved)

txeriff
Member Posts: 515
Hi all,
Hope some1 can help. Im trying to read a BLOB from sql but I dont get proper information. tried the following:
,convert(varchar(max),convert(varbinary(max),[campoBLOB]))COLLATE SQL_Latin1_General_CP1_CI_AI as campoblobbbbb
,convert(nvarchar(max),convert(varbinary(max),campoBLOB)) COLLATE SQL_Latin1_General_CP1_CI_AI as campoblobbbbb2
also without collation but data is wrong.
Any ideas?
Edit:
Found that uncompressed BLOB works fine but the accents. How could I fix them? As you can see in the image, red blox is standard NAV description text field. green is my BLOB field. it should show "saltó" in both cases. Any ideas?
thanks.
Edit2:
I managed to solve it using ansii2ascii codeunit I had. So I write values in ansi and read them writing back to ascii. It worked for me.
Hope some1 can help. Im trying to read a BLOB from sql but I dont get proper information. tried the following:
,convert(varchar(max),convert(varbinary(max),[campoBLOB]))COLLATE SQL_Latin1_General_CP1_CI_AI as campoblobbbbb
,convert(nvarchar(max),convert(varbinary(max),campoBLOB)) COLLATE SQL_Latin1_General_CP1_CI_AI as campoblobbbbb2
also without collation but data is wrong.
Any ideas?

Edit:
Found that uncompressed BLOB works fine but the accents. How could I fix them? As you can see in the image, red blox is standard NAV description text field. green is my BLOB field. it should show "saltó" in both cases. Any ideas?
thanks.
Edit2:
I managed to solve it using ansii2ascii codeunit I had. So I write values in ansi and read them writing back to ascii. It worked for me.
0
Answers
-
Hi, here is a Version with an uncompressed blob. He is integrating a .net assembly.
https://devch.wordpress.com/2012/01/12/read-content-of-nav-notesblobs-from-sql/
with this you can also try his blob reading example from compressed blobs.
https://devch.wordpress.com/2014/01/21/accessing-compressed-blobs-from-outside-nav-nav2013-revisited/
Hope this helps ...
With kind regards
mik0 -
Hi, here is a Version with an uncompressed blob. He is integrating a .net assembly.
https://devch.wordpress.com/2012/01/12/read-content-of-nav-notesblobs-from-sql/
with this you can also try his blob reading example from compressed blobs.
https://devch.wordpress.com/2014/01/21/accessing-compressed-blobs-from-outside-nav-nav2013-revisited/
Hope this helps ...
Hi,
i didnt want to go into deep`developemnt. Cant it be fixed the collation? as you can see Im very near to solution.
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