Thanks as I maintain the delphi version of our product but for the last 3 years they are developping the web version of it :)
I really appreciate all the help and hints you gave me :)
Slainte
Hi I work for a canadian company and we have a customer who use sage 300 in Dominican republic.. don't know if the could fit as I not sure what is your problem.
Hi Django,
I found where the problem is...Have same pointer for the view.fields.fieldbyname[''] until I compose the view
TmpViews := VarArrayCreate([0,0],varVariant);
TmpViews[0] := arrAccpacInvoiceAR0032[i].View;
arrAccpacBatchAR0031[i].View.Compose(TmpViews)...
Django,
There is something weird this morning..
the field CNTBTCH has a different pointer if I use CNTbtch or CNTBTCH...
in delphi since when the lower or uppercase change something??
Again thanks a million for your help !!! :)
Wait... this morning I did it again and now for some reason the field name is same ...
but in my 3nd test...
the pointer is different
arrAccpacBatchAR0031[y].cntbtch
Pointer($8BC03D0) as IAccpacViewField
arrAccpacBatchAR0031[y].View.Fields.Fieldbyname['CNTbtch']
Pointer($8BF94F8) as...
I did as u said before I try to set the value...
Same name and same pointer.. really this is some weird behavior.
now at least the customers will be able to work with it.. but just for personal knowledge I'd like to understand why this give me an access violation
As reading the code it should...
here is the function that is in the code since forever.
I admit it's a long way to get the field I need but I didn't write it and it works for customer and for vendors
function TdmACCPAC.GetIAccpacViewField( prmFields : IAccpacViewFields; prmFieldName : String ) : IAccpacViewField;
var
i ...
Hi Django,
This really helps... as the way you assign the variable also work for us :))))))
I don't know just yet but I use your example..and when I do like you View.Fields.Fieldbyname('').SetValue...
Then no access violation...
so I'll check in the code as they are initialize like this...
Ok cool Tuba2007 and thanks a million for your time...
for what I can see from this thread the view is created same as you and for you it works..for me with comapi on AR and AP transfer I have access violation.. Same code with XAPI was working fine and still works fine for vendor and customers...
tmpValue := 'AbakAP';
arrAccpacBatchAR0031[y].View.Cancel;
arrAccpacBatchAR0031[y].View.RecordGenerate(True) ; // True or False same problem
arrAccpacBatchAR0031[y].BTCHDESC.Set_Value(tmpValue);
Still access violation when I try to assign the batch description.
yes I did that's the code I ran that had the access violation
tmpValue := 'AbakAP';
arrAccpacBatchAR0031[y].View.Cancel;
arrAccpacBatchAR0031[y].View.Init;
arrAccpacBatchAR0031[y].BTCHDESC.Set_Value(tmpValue);
Also I checked how I create the view and how u did it.. and we...
A little more in the XAPI version of our dll
// Open the view
arrAccpacBatchAR0031[i].View := arrAccpacSession[i].OpenView('AR0031', 'AR');
arrAccpacBatchAR0031[i].Fields := arrAccpacBatchAR0031[i].View.Fields;
arrAccpacBatchAR0031[i].CNTBTCH...
in my post I had the error of the browse that is not there that's one of the test
the old code is this with XAPI
arrAccpacBatchAR0031[y].CNTBTCH.PutWithoutVerification(0);
arrAccpacBatchAR0031[y].View.Init;
arrAccpacBatchAR0031[y].INVCTYPE.Value :=2; // Type Summary
the new one...
Hi, we migrated our dll that connect to accpac from XAPI to COMAPI... Few things had change like the way we create view , open session.. change string and integer to olevariant but nothing major..
We can update and create customer, vendor in Accpac no problem
Now I just start testing the other...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.