NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: wasatchconsulting on November 08, 2015, 11:27:41 PM
-
I have am reading a MSSQL table with a "Text" field. This is translated as a "Blob" in Clarion. NetTalk crashes trying to read this file directly, so I have used the String Theory "FromBlob" to read the field successfully, but for the life of me, I cannot figure out how to get this to display. I have created a local variable to hold the data and it does get the data "in certain embeds", but does not show. I have placed the code to get the data in the "PreUpdate" start embed which does place the data in the local variable, but again, nothing on the screen shows. Tried using "do Refresh::Local", but this causing unexpected results at this point.
Thanks
Ken Watts
-
Hi Ken,
>> NetTalk crashes trying to read this file directly,
Did you mean...
NetTalk crashes trying to read this [field] directly ?
Blobs are special because the table _has_ to be open when they are accessed, so their support is somewhat limited in some places.
You don't mention if you are build a WebServiceMethod here? or a Form?
Perhaps some context will be useful?
Cheers
Bruce
-
Sorry, should have mentioned that I was trying to work with the blob on a web form. I was trying to read it with blobfield[0 : size(blobfield)] which causes a crash, so I used the FromBlob in string theory to read the blob.
Thanks
Ken
-
use BLOBTOFILE i have several project that use this function without problems..
-
From what I see, this is used to send the contents of a blob to a file. Once you send the data to a file, are you displaying the file? I am trying to display the text in the blob and not send the data to a file so I am not sure how BLOBTOFILE applies, can you give me an example?
Thanks
Ken
-
Found the issue.
I placed the code to get the text from the blob field in the "PreUpdate" embed and it was grabbing the data, but when I set the session variable "p_web.SetSessionValue('LOC:Text',LOC:Text)", it was blank. I just needed to clip the data field. The data field I am saving the text to is a STRING(65535) and so this needed to be clipped.
p_web.SetSessionValue('LOC:Text',CLIP(LOC:Text))
Ken