C/Front, Visual Basic & BLOB-Fields

Kromozone
Member Posts: 47
Community,
i'm working on a small Visual Basic Tool. The User can scan Sheets and Reports and my Tool should save them in then Navision Database via C/FRONT OCX.
On VB side, the Bitmap is saved into an Byte-Array. But how can i save this Array into an BLOB-Field on Navision side?
I can write Text and other datatypes, but i have no more idea's to save the Bitmap as BLOB.
Thank you for your Help!
Regards
Andreas Nebel
Kisling Consulting GmbH, Neckarsulm
www.kisling-consulting.de
i'm working on a small Visual Basic Tool. The User can scan Sheets and Reports and my Tool should save them in then Navision Database via C/FRONT OCX.
On VB side, the Bitmap is saved into an Byte-Array. But how can i save this Array into an BLOB-Field on Navision side?
I can write Text and other datatypes, but i have no more idea's to save the Bitmap as BLOB.
Thank you for your Help!
Regards
Andreas Nebel
Kisling Consulting GmbH, Neckarsulm
www.kisling-consulting.de
0
Comments
-
youľl need to export picture into bitmap file (BMP, single picture per record) and import it to BLOB.
here is sample code taken from Navision 3.70 - form Company info, menu button PicturePictureExists=boolean Picture=BLOB field in Company Information text001=confirmation string PictureExists := Picture.HASVALUE; IF Picture.IMPORT('*.BMP',TRUE) = '' THEN EXIT; IF PictureExists THEN IF NOT CONFIRM(Text001,FALSE) THEN EXIT; CurrForm.SAVERECORD;
Martin Bokůvka, AxiomProvis0 -
Thank you for your reply.
My problem was the byte-array on VB side. I only had to write the binary into an flat variable and then -> it works!
Andy0 -
I think the VB code should be something like this:
Dim intFF as integer Dim intCount as integer intFF = Freefile Open "c:\image.bmp" for output as intFF For intCount = 1 to UBound(ByteArray) Put intFF, ByteArray(intCount) Next intCount Close intFF
I assume the byte array has the exact content of the bmp file?
I have never worked with a byte aray though. I don't know why you chose that, think it is the same as a string isn't it?
How do you fill the byte array?
Regards Jan-PieterIn a world without Borders or Fences, who needs Windows and Gates?0 -
Here's my function. Works perfectly now.
Function MakeBinaryLargeObject(strFilename As String, varBinaryLargeObject As Variant) As Boolean 'Erstellt BLOB-Feld aus übergebener Datei Dim bytBinaryLargeObject() As Byte Open App.Path & "\" & strFilename For Binary As 1 ReDim bytBinaryLargeObject(LOF(1)) Get 1, 1, bytBinaryLargeObject Close 1 varBinaryLargeObject = bytBinaryLargeObject 'Quelldatei wird gelöscht Kill App.Path & "\" & strFilename End Function
As Yet I write the Content of the Bitmap-File into an Byte-Array. But if i want to put them to C/Side, it has to be a flat variant. That was all0 -
Hi,
I am also facing the same problem,
I believe you have solved your problem , if yes please help me in solving my problem also.
Thank in advance
Ravi,0 -
-
Hi All,
Recentally I have got the solution for my query.
Thanks to you all. :P0
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