on 05-27-2006 7:37 PM
Hi
I am starting work on a project using Delphi 6 (update2) using Business One DLL SAPBoBscom2005.dll
I have imported the type library and have Business One Components on my palette
When I use the Company component I can access
company.getcompanylist.recordcount
company.getcompanylist.fields.count etc successfully
But when I try to access company.getcompanylist.getAsXML I get an Access Violation error :
1008AC03 in module SAPBOBSCOM2005.dll
Anybody else experience this ? should I change to Delphi 2005 as the project is just starting?
Any advice appreciated
Hi Iqubal,
It is nice to see some one working on DELPHI in developement of SAP Business One .
i have tried it on DELPHI 5 and DELPHI 7 it is working,
can i know whether u r getting this problem only for Company componet or while useing other document also..
Regards
shoban
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shoban
Thanks for your reply
I have only tried the Company component
maybe it is something I am doing wrong in the way I am calling company
1. new project
2. add company component : company1
3. add button component button1
4. add panel component panel1
5. add panel component panel2
6. add panel component panel3
button1 onclick event:
company1.language := ln_english;
company1.Server := 'devsap';
panel1.Caption := inttostr(company1.GetCompanyList.RecordCount);
if company1.Connected then
begin
panel2.Caption := 'con';
end
else
begin
panel2.Caption := 'dis';
end;
end;
panel3.caption := company1.GetCompanyList.GetAsXML;
when run I get Access violation error
if I remove line
panel3.caption := company1.GetCompanyList.GetAsXML;
it runs ok and I get the recordcount '2' which is correct showing on panel1 and panel2 shows 'dis' for disconnected
any ideas
by the way I loaded Delphi 2006 and it does the same
Rgds
Iqbal
Hi Iqbal,
Unless you did in the meantime you should check-out the available documentation (SDK Helpcenter) + the E-learning.
Please go to the SAP Business One Developer Area here on SDN at https://www.sdn.sap.com/irj/sdn/developerareas/businessone.
The reason why you run into the error is simply that you don't call Connect() to connect to a company DB...
This is step 1 in any sample + the training material.
Even working with Delphi / Pascal doesn't exempt you from connecting before working with the connection
Thanks,
Frank (once having programmed with Turbo Pascal...)
User | Count |
---|---|
92 | |
9 | |
9 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.