OCX IStream object into a blob field
theow
Member Posts: 2
Basically I have created an OCX Control that has two functions: (I used
the symbol menu to get these definitions)
[BOOL SetBGImageStr :=] MyOCX.SetBGImageStr(VAR ISTREAM JPGStream)
[ISTREAM GetBGImageStr :=] MyOCX.GetBGImageStr()
GetBGImageStr reurns an IStream object which I want to save to a blob
field. SetBGImageStr would be used to pass the contents of the blob back
to the OCX. This way I can have an external viewer for the data, but
still store it in Navision Attain.
I can change GetBGImageStr to look the same as SetBGImageStr if that
would make the implementation easier in Attain.
My problem is this:
How do I get the IStream object into the blob field? I have been
searching on the web, and through all of the documentation that I have,
and could find only two examples of how to use an instream or an
outstream. The one example makes use of XMLDom, and does not work, the
other makes use of a file and only writes text to the file. Could you
help me to solve this either by giving me an example, pointing me in the
right direction to figure out how to do this? The whole thing can be
done by making use of a temporary file, but I would prefer not to.
the symbol menu to get these definitions)
[BOOL SetBGImageStr :=] MyOCX.SetBGImageStr(VAR ISTREAM JPGStream)
[ISTREAM GetBGImageStr :=] MyOCX.GetBGImageStr()
GetBGImageStr reurns an IStream object which I want to save to a blob
field. SetBGImageStr would be used to pass the contents of the blob back
to the OCX. This way I can have an external viewer for the data, but
still store it in Navision Attain.
I can change GetBGImageStr to look the same as SetBGImageStr if that
would make the implementation easier in Attain.
My problem is this:
How do I get the IStream object into the blob field? I have been
searching on the web, and through all of the documentation that I have,
and could find only two examples of how to use an instream or an
outstream. The one example makes use of XMLDom, and does not work, the
other makes use of a file and only writes text to the file. Could you
help me to solve this either by giving me an example, pointing me in the
right direction to figure out how to do this? The whole thing can be
done by making use of a temporary file, but I would prefer not to.
0
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