C10, Add(ing) blobs to MSSQL database

Hello there !

I’m new to this site, and also completely new to Clarion.

At the moment I’m working on a small program, and i can’t seem to get my head around what’s wrong, and i hope that you are willing to help, and point me in the right direction.
The complete code can be found here

http://pastebin.com/s4q1r9wS

I’m trying to tranfer records from a .TPS file, to a MSSQL database. The .TPS file consists of several different datatypes, which are transfered to MSSQL just fine.
BUT! One of the fields is a blob field, and for some reason, using ADD, I can’t transfer this field to MSSQL - what i end up with is all fields from the .TPS file correctly transferred to the MSSQL database, except the BLOB field, which is “NULL” (The blob field from the .TPS file is definetly not NULL) .

The reason for the close-, open-, set expressions, is because the program will stop without them - clumsy hack, but it works. The loop has contained only the “Do assignRecord”, and that didn’t change a thing, thus i suspect the error is not inside the for loop, but might be in the assignRecord, where i incorrecly assign blob data to the MSSQL variable?

I have no experience with blobs like this but I do notice that in the help they do a check for errors after the PROP:Handle:

SET(Names)
 LOOP
  NEXT(Names)
  IF ERRORCODE() THEN BREAK.
  ArcNames.Rec = Names.Rec                               !Assign rec data to Archive 
  ArcNames.Notes{PROP:Handle} = Names.Notes{PROP:Handle} !Assign BLOB to Archive 

  IF ERRORCODE() = 80
   MESSAGE(‘BLOB size is too large’)
   BREAK
  END
  ArcNames.Notes{PROP:Size} = Names.Notes{PROP:Size}     ! and adjust the size
  ADD(ArcNames)
 END

You could try something like that and see if it shows anything useful?

I have tried inserting this in the DoAssign:

STO:FILE{PROP:Handle} = IN:FILE{PROP:Handle}

IF ERRORCODE() THEN
MESSAGE(‘BLOB size is too large’)
!BREAK
END

It gives me no errors.

Hi,
I know this is an old post.
Curious if an answer was found though.
For my part, the deep assignment of STO from IN follows a number of implicitly assigned variables.
Shouldn’t the deep assignment be done before the implicitly assigned values or am I not following the code correctly?
Regards