Link to home
Start Free TrialLog in
Avatar of obrienj
obrienj

asked on

Function Sequence Error -

Hello, I have a program, written in clarion, which is already connected with MSSQL and Oracle. I am now trying to connect with MS Access and am having a problem.

Within my program I use blobs, for images and rtf etc....

In access, these image fields are created as ole objects. I assume this is correct. My problem is that when I try to add to this field, I get the error message 'Function Sequence Error'.

To see if the field was the right type I imported some of my data from MSSQL and there was no problem copying in the image fields from mssql to the ole object fields in access.

I could also open and view these from my program, but still could not alter them... same error message.

This is pretty important, and Im under pressure to get it done....... so any ideas?

Avatar of harfang
harfang
Flag of Switzerland image

I believe you should not use OLE fields. Check out this site:
http://www26.brinkster.com/alzowze/Blobs.asp
The author is very convincing... And there are a few examples, too.

Good Luck
Hi obrienj

it all depends how the data was put into the OLE fields in Access, when you open the Access table does the field  display the words 'Long Binary Data' or does it display words like 'Bitmap Image' or 'Jpeg Image' etc...

Alan
Avatar of obrienj
obrienj

ASKER

thanks for the responses...
firstly... I took a look at that webpage. At the end he is still using ole objects, but in a different way. As I have no knowledge of vb I dont really know what he is doing there....

alan..
When the table is first created it is just blank. But when I copied in from mssql it said long binary data..
what does this mean.
Should I be putting in the blobs in a different way than I did in mssql/oracle?
Hi obrienj

No, in my opinion that is the best result we could hope for here, it is definately blob data in the field.
What is it you are actually trying to do with data in the field, do you want to extract it to file?

Alan
Avatar of obrienj

ASKER

Alan,
I have two types, one is an actual image and the other is rtf.

Lets take the image as thats easier, and I believe its the same problem.

lets say I give the user the right to add images to the program, so he selects through a browser and I take the image he selects and save it to the database... below is how I do it for mssql and oracle:
FPI:lobjclaid = lclaid
FPI:lobjid = lid
FPI:sPictureNAme = sPicture
FPI:bPicture{prop:size} = bBlob{prop:size}
FPI:bPicture{prop:handle} = bBlob{prop:handle}
add(fPic)

where bBlob is of type blob in clarion. And FPI: is how we reference file fields in clarion... add(fpic) is a clarion command which the odbc driver converts into sql.

This works for both. I realise that this is clarion code which you prob don't know about.. but it should work the same for all the odbc databases right? There must be something extra that I have to do for access or something
Hi obrienj

Im not sure I can help you with this mate, but I will try.
Does clarion support VB or VBA scripting?

If you try to only append the fields lclaid, lid and sPicture without the binary long data is your append succesful?

FPI:lobjclaid = lclaid
FPI:lobjid = lid
FPI:sPictureNAme = sPicture

Alan




Avatar of obrienj

ASKER

I don't think it does support vb or vb scripting... ill try and find out... if it did, how could you help?

yes it does append succesfully if I leave out the blob section....
ASKER CERTIFIED SOLUTION
Avatar of Alan Warren
Alan Warren
Flag of Philippines image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of obrienj

ASKER

Okay I will try and convert this to clarion code and see what happens... ill get back to you tomorrow sometime... thanks again...
good luck, catch you tomorrow, I gotta get some sleep here now, 3:30am
Avatar of obrienj

ASKER

okay... sorry, I have tried everything and still failing. the code I am using should work, so have come to the conclusion it is a bug in the language. I will have to go for a workaround until something comes up... thanks for the help anyhow