Problem assigning data between two ocx

I have two ocx?s that I?m trying to assign data between. This works fine if I write the code in Visual basic, but in Attain I get the error message: The length of the text string exceeds the size of the string buffer. Can it be that Attain imports the data into one of its own variables, with all its limitations, and then assign the data to the second ocx? If that is the case, is there some way around the problem? Technical info: OCX arguments [BSTR SigString :=] OCX1.String([BSTR SigString]) [BSTR SigString :=] OCX2.String([BSTR SigString]) I have tried these two method to assign data between the ocx?s.: OCX1.String = OXC2.String; and OCX1.String(OXC2.String); VISUAL BASIC EXEMPLE SigPlus1.SigString = SigSign1.SigString Bjarni Thor Bjarnason Software Development Landsteinar Iceland

Visual Basic is far more flexible with the datatypes than Navision, I have done several projects with automation controllers and ocx’s and see this error sometimes. Below is the usual causes - The Navision String variables length is not enough to hold the data returned from the ocx. - Navision can not handle embedded functions in OCX calls, i.e. ocx.method(FORMAT(var)) will cause an error, the solution is to prepare a single Navision variable with the value, you want to pass into the OCX, like Var := FORMAT(Var) ocx.method(var) - A parameter is byref and the parameter is not able to hold the changes made inside the ocx to the paramater variable. Lets say you call the ocx.method(Byref Email) and Email is a string of 100, but inside the OCX it comes back from a call inside the OCX with a string of 110, then the ocx changes the value to a length of 90, before returning it to Navision, this will still cause Navision to give a string buffer error. This is caused by bad programming of the ocx, but it happens. Hopefully some of these obersvations can hlp you get rid of the error.

Hi Bjarni, I’ve already answered this question in your “Error assigning value to Variant variable” issue. Try to make it in 2 steps: 1. OCX2.String → BLOB 2. OCX1.String <-BLOB Regards, /DMC

Yo Bjarni… the Barclays system is still working… Cheers for all your help mate Adrian… and the rest of the Barclays boys!