Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 604
  • Last Modified:

RAD 2007 = Web Service :: Still unable to consume WS

Good day All,

I am fairly new to Delphi Web Services / SOAP.
We've been tasked to consume a web service hosted by a customer.
The idea is to submit delivery notes automatically to our customer via the
web service and eliminate the manual capturing of delivery notes.
Unfortunately the customer has contracted the web service server to a 3rd
party and we are unable to get any assistance from them.

They provided me with a WSDL and I've imported the WSDL in RAD 2007 to
create the interface.

I am having difficulty understanding the structure of the interface and how
to assign values and submit that to the web service server.
Please see complete code for the Interface unit after importing the WSDL as
provided by our
customer and my code as well attached to this post.

1. From the wsdl interface I understand there are several TRemotables ao:

Delivery Note Header:
SGRH = class(TRemotable)

Delivery Note Details (Lines):
SGRD = class(TRemotable)

Delivery Note Footer:
SGRT = class(TRemotable)

and then Lastly this Remotable:
SGR_IN = class(TRemotable)

- In the SGR_IN implementation there are a the following published
properties:
property SGRH: SGRH           Index (IS_OPTN or IS_UNQL) read FSGRH write
SetSGRH stored SGRH_Specified;
property SGRD: Array_Of_SGRD  Index (IS_OPTN or IS_UNBD or IS_UNQL) read
FSGRD write SetSGRD stored SGRD_Specified;
property SGRT: SGRT           Index (IS_OPTN or IS_UNQL) read FSGRT write
SetSGRT stored SGRT_Specified;

- and if you look at the implementation of SGRD you find the following
published properties:
property DN_NR:          Array_Of_string  Index (IS_OPTN or IS_UNBD or
IS_UNQL) read FDN_NR write SetDN_NR stored DN_NR_Specified;
property DN_ITEM:        Array_Of_string  Index (IS_OPTN or IS_UNBD or
IS_UNQL) read FDN_ITEM write SetDN_ITEM stored DN_ITEM_Specified;
property BROADCASTNAME:  Array_Of_string  Index (IS_OPTN or IS_UNBD or
IS_UNQL) read FBROADCASTNAME write SetBROADCASTNAME stored
BROADCASTNAME_Specified;
property HARI_SEQNO:     Array_Of_string  Index (IS_OPTN or IS_UNBD or
IS_UNQL) read FHARI_SEQNO write SetHARI_SEQNO stored HARI_SEQNO_Specified;
property JOBNO:          Array_Of_string  Index (IS_OPTN or IS_UNBD or
IS_UNQL) read FJOBNO write SetJOBNO stored JOBNO_Specified;
property SYMBOL:         Array_Of_string  Index (IS_OPTN or IS_UNBD or
IS_UNQL) read FSYMBOL write SetSYMBOL stored SYMBOL_Specified;
property PART_NUMBER:    Array_Of_string  Index (IS_OPTN or IS_UNBD or
IS_UNQL) read FPART_NUMBER write SetPART_NUMBER stored
PART_NUMBER_Specified;
property QUANTITY:       Array_Of_string  Index (IS_OPTN or IS_UNBD or
IS_UNQL) read FQUANTITY write SetQUANTITY stored QUANTITY_Specified;
property SA_NUMBER:      Array_Of_string  Index (IS_OPTN or IS_UNBD or
IS_UNQL) read FSA_NUMBER write SetSA_NUMBER stored SA_NUMBER_Specified;
property SA_ITEM_NUMBER: Array_Of_string  Index (IS_OPTN or IS_UNBD or
IS_UNQL) read FSA_ITEM_NUMBER write SetSA_ITEM_NUMBER stored
SA_ITEM_NUMBER_Specified;
property GR_QTY:         Array_Of_string  Index (IS_OPTN or IS_UNBD or
IS_UNQL) read FGR_QTY write SetGR_QTY stored GR_QTY_Specified;

1) My first question, I do not understand in the main class, SGR_IN, the
property SGRD is declared as an ARRAY_OF_SGRD and when looking at the SGRD
class each field is also an ARRAY.
I don't understand because a delivery note only has:
Header Information (Company Details)
Detail Information (Lines or Parts)
Footer Information (in this case it is only the sum of all the Parts = Total
Parts on DN)

2) I am currently trying to consume the web service with the code in the
attached txt file, gr_code.txt.
Please see the line in the code with comment:
//******************************************
// Access Violation on the next line on code?????
//******************************************
When trying to create an instance of the SGRD I receive an Access Violation.

3) And then to conclude. I am not sure whether I am correct but to me it
looks like I need to create and populate:
The Header remote table = SGRH
then the Details (properties of array ??????) = SGRD
then the Footer = SGRT
AND then assign them to the main Remotable: SGR_IN for example:

mySGRH := SGRH.Create;
//Populate the header fields

mySGRD = SGRD.Create;
//Confusement here because the properties are all of arrays and in the main
Remotable the SGRD property is also declared as an array again.
mySGRD.DN_No = DN_Array;
mySGRD.Item_No = ItemNo_Array
// etc populate line details

mySGRT = SGRT.Create
//Populate properties

AND No Build the main Remotable
mySGR_IN = SGR_IN.Create;
mySGR_IN.SGRH = mySGRH;
mySGR_IN.SGRD = mySGRD; //this property, mySGR_IN.SGRD is declared as an
array of SGRD?????? The fields within SGRD are also declared as arrays of
widestring?????
mySGR_IN.SGRT = mySGRT;

and now submit the mySGR_IN to web service server.
Is this correct besides all the questions I've got in between.
The logic I am following?

Please assist kindly as I am really urgently seeking help.
I've read several online articles but they are not helpful with my problem.

Kind regards.
:)

gr-code.txt
gr-wsdl.txt
0
Marius0188
Asked:
Marius0188
  • 6
  • 6
1 Solution
 
epasquierCommented:
Hi,

First, I'm not that used to WebServices, so don't expect an answer as definitive as I'm used to give.

That said, about your AV error :
        ASGR_IN.SGRD[1] := SGRD.Create;
        ASGR_IN.SGRD[1] := ASGR_D;
There is no way that can work for 2 reasons :
a) you cannot access an array property that does not exist already, so SGRD[1] is invalid at this point and that is why you have an AV.
I am not yet sure if SGRD has to be set as an array, like you I find odd the fact that there are also arrays in each details. And usually array properties start with index 0, not 1 (but that can be changed completely in implementation , that is just the case 99,99% of times)
b) let's assume that SGRD[1] is a valid property, or let's call it "D" as a simple SGRD variable.
D:=SGRD.Create; followed by
D:=ADGR_D;
is not good. It will compile, it will even work, but you are creating an object, assignig it's reference to a variable, and the very next line you assign that variable to another object. In Delphi, you will loose the track of the created object, as it has no garbage collector to clean the messy code you just wrote : the object will remain in memory, it cannot be used anymore, and will stay there until the application restart.
So what you have to do is either :
D:=SGRD.Create;
D.SomeProperty:=...;
OR :
D:=ADGR_D;

Now, about your other question, your logic seems valid, but as I said I'm not used to WebServices so I'm not sure, there could be another way of implementing such objects structure.
Option A) as you did, you have to create the headers and other objects properties of the IN message, and so it is OK to do as you have coded
Option B) when you create the root message, all objects properties are initialized as well, created already with empty - but not nil - objects. So you can access their properties directly.
In that case, you could omit the Header and Footer creation after   ASGR_IN := SGR_IN.Create;
But anyway, if ASGR_IN property setters are correctly implemented, it would do no harm to do  ASGR_IN.SGRH  := SGRH.Create;
as the older SGRH object would be freed by the setter. So except a little CPU cycles lost, no problems.

I'll dig in some more information about WebServices in general with Delphi, and look better at gr_wsdl.txt to refine my thoughts
0
 
epasquierCommented:
Hi again.

I gave a better look at gr_wsdl.txt and that was interesting. I think that the fact that the details in the IN msg are stored as array of SGRD and all those SGRD properties are also arrays comes from the *potential* need to regroup some details in logical groups. But if you don't feel the need, then each detail object would be better with only single element properties.

Here is the code that destroy the IN message :
destructor SGR_IN.Destroy;
var
  i: Integer;
begin
  for i := 0 to Length(FSGRD)-1 do
    FreeAndNil(FSGRD[ i ]);
  SetLength(FSGRD, 0);
  FreeAndNil(FSGRH);
  FreeAndNil(FSGRT);
  inherited Destroy;
end;

it tells us that each detail object in the array are destroyed automatically when the message is destroyed. So you should not assign the detail array property to a global array, that is only calling for AV later if you do things the wrong way.

That means also that if you don't want to have to manage destruction of the details objects yourself, you have to NOT reuse the IN messages, so create one each time you send one, and destroy after use.

Here is how you should create IN message and set your details :
procedure TfrmMain.DeliverNow2_;
var
 iRowCount, iCounter :Integer;
 ASGR_IN :SGR_IN; // NOT GLOBAL ANYMORE (nor other ASGR objects)
begin
 Try
  qView.SQL.Text := 'SELECT * FROM DeliverNotes';
  qView.Open;
  while not qView.Eof do
   Try
    ASGR_IN := SGR_IN.Create;
// The following two lines could be implemented in a SGR_IN.Create constructor, as they will always follow default SGR_IN.Create
    ASGR_IN.SGRH  := SGRH.Create;
    ASGR_IN.SGRT := SGRT.Create;
    //Assign Header
    ...
    qSubView.Open;
// setup the detail array
    SetLength(ASGR_IN.SGRD,qSubView.RecordCount);
    for i:=0 to qSubView.RecordCount-1 do ASGR_IN.SGRD[i]:=SGRD.Create;
// after that, you can access each detail object using the index 0..RecordCount-1
    qSubView.First; // just to be sure, but that should be the case already
    while not qSubView.Eof do With ASGR_IN.SGRD[qSubView.RecNo] do
     begin
      ASGR_D.DN_NR  := qSubView.FieldByName('DelNote').AsString;
      DN_ITEM       := qSubView.FieldByName('PartNo').AsString;
      BROADCASTNAME := edtBroadcastIMV.Text;
      HARI_SEQNO    := qSubView.FieldByName('Hari').AsString;
      JOBNO         := qSubView.FieldByName('JobNo').AsString;
      SYMBOL        := qSubView.FieldByName('Symbol').AsString;
      PART_NUMBER   := qSubView.FieldByName('PartNo').AsString;
      QUANTITY      := qSubView.FieldByName('DelQty').AsString;
      SA_NUMBER     := qSubView.FieldByName('SAPNo').AsString;
      SA_ITEM_NUMBER:= '10';
      GR_QTY        := '0';
      qSubView.Next;
     end;
// Should you not send one message per qView line ??
// The header suggests it..
    ResultCode := WebService.Rec_SGR_IN(ASGR_IN);
// So you have a problem to manage with your ResultCode, which should be checked for each message.
    qView.Next;
   Finally
    ASGR_IN.Free; // Destroy the whole message each time
   End;
 Except
  On E:Exception do
   MessageDLG('Error occurred in: procedure TfrmMain.DeliverNow;' + #13#10 + 'Message: ' + E.Message + #13#10 + 'Class Name: ' + E.ClassName, mtError, [mbOk], 0);
 end;
end.

Open in new window

0
 
Marius0188Author Commented:
Hi there,

Thanks for the replies.
I am trying to implement your code but I receive the following compiler error:
"[DCC Error] frmMainUnit.pas(368): E2197 Constant object cannot be passed as var parameter"

on this line of code:
SetLength(ASGR_IN.SGRD, qView.RecordCount);

Any suggestions please?
:)
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
Marius0188Author Commented:
Ok what I've done is declared the following variable:

var
ASGR_D :Array_Of_SGRD;

and then
SetLength(ASGR_D, qView.RecordCount);

I will assign this var to the SGR_IN.SGRD after populating it.

But now my problem as mentioned in initial comment:
I can not simply assign a value to the array but need to populate the elements of this array.
Compiler array: "[DCC Error] frmMainUnit.pas(379): E2010 Incompatible types: 'Array_Of_string' and 'string'"

Code:
          With ASGR_D[qSubView.RecNo] do
          begin
            DN_NR  := qSubView.FieldByName('DelNote').AsString;
            DN_ITEM       := qSubView.FieldByName('PartNo').AsString;
            BROADCASTNAME := edtBroadcastIMV.Text;
            HARI_SEQNO    := qSubView.FieldByName('Hari').AsString;
            JOBNO         := qSubView.FieldByName('JobNo').AsString;
            SYMBOL        := qSubView.FieldByName('Symbol').AsString;
            PART_NUMBER   := qSubView.FieldByName('PartNo').AsString;
            QUANTITY      := qSubView.FieldByName('DelQty').AsString;
            SA_NUMBER     := qSubView.FieldByName('SAPNo').AsString;
            SA_ITEM_NUMBER:= '10';
            GR_QTY        := '0';
          end;

This structure really bugs me.

Please help here.
Thanks a lot!
:)
0
 
Marius0188Author Commented:
DN_NR :Array_Of_String
therefore I can not assign a value directly to the array but need to do something like this:
DN_NR[0] := "Value";

But why is this also an array?
What is the sense of having an array of fields and an array of lines?

:)
0
 
Marius0188Author Commented:
Ok I've done this for testing:
          With ASGR_D[qSubView.RecNo] do
          begin
            DN_NR[0]          := qSubView.FieldByName('DelNote').AsString;
            DN_ITEM[0]        := qSubView.FieldByName('PartNo').AsString;
            BROADCASTNAME[0]  := edtBroadcastIMV.Text;
            HARI_SEQNO[0]     := qSubView.FieldByName('Hari').AsString;
            JOBNO[0]          := qSubView.FieldByName('JobNo').AsString;
            SYMBOL[0]         := qSubView.FieldByName('Symbol').AsString;
            PART_NUMBER[0]    := qSubView.FieldByName('PartNo').AsString;
            QUANTITY[0]       := qSubView.FieldByName('DelQty').AsString;
            SA_NUMBER[0]      := qSubView.FieldByName('SAPNo').AsString;
            SA_ITEM_NUMBER[0] := '10';
            GR_QTY[0]         := '0';
          end;

But when to try assign the first field and array element a value I get an ACCESS VIOLATION again.
Stepping my code and AV error here:
            DN_NR[0]          := qSubView.FieldByName('DelNote').AsString;

There must be a solution to this overly complicated implementation of a web service server.
Please anyone help me :)
0
 
epasquierCommented:
SetLength(ASGR_D, qView.RecordCount);
I will assign this var to the SGR_IN.SGRD after populating it.
Precisely. I thought it was possible you got that error, It was worth a try. Glad to see you found the solution.

about the sub fields which are arrays, well yes that is annoying. The solution is again to use SetLength first, then assign to the first element ([0]). At this point, it is going to be a real pain to code. Probably the best solution would be to override the Create constructor of SGRD so that it at least initialize each fields with a length of one, and maybe add properties to access the first element of each array directly.

If you can sort it out yourself, that would be good as I'll have to go now, otherwise I'll do what I can to help later tonight

Anyway, if someday you can contact the people who made that webservice, and ask them why the arrays, I'd be curious to know
0
 
Marius0188Author Commented:
Ok looks like I've got to the point where I can post to the web service server.
But now I am receiving this error: see image attached please.

1. Is this an error on my side / client?
2. Is this an error on the server?

My final code is also attached.

Please help, thanks all!
procedure TfrmMain.DeliverNow2_;
var
  X, iRowCount :Integer;
  ASGR_IN :SGR_IN;
  ASGR_D :Array_Of_SGRD;
begin
  Try
    qView.SQL.Text := 'SELECT * FROM DeliveryNotes ';
    qView.Open;

    while not qView.Eof do
    begin
      ASGR_IN := SGR_IN.Create;
      ASGR_IN.SGRH  := SGRH.Create;
      ASGR_IN.SGRT := SGRT.Create;
      Try
        //Assign Header
        ASGR_IN.SGRH.VENDOR_ID := edtVendorID.Text;
        ASGR_IN.SGRH.DN_NR := qView.FieldByName('DelNote').AsString;
        ASGR_IN.SGRH.DN_DATE := qView.FieldByName('DelDate').AsString;
        ASGR_IN.SGRH.DN_TIME := '';
        ASGR_IN.SGRH.UPLOAD_DATE := '';
        ASGR_IN.SGRH.UPLOAD_TIME := '';
        ASGR_IN.SGRH.POST_DATE := '';
        ASGR_IN.SGRH.POST_TIME := '';

        qSubView.SQL.Text := 'SELECT * FROM DeliveryNoteItems WHERE DeliveryNoteItems.DelNote  = :DelNote';
        qSubView.Parameters.ParamByName('DelNote').Value := qView.FieldByName('DelNote').AsInteger;
        qSubView.Open; qSubView.Last; qSubView.First;
        iRowCount := qSubView.RecordCount;
        SetLength(ASGR_D, qSubView.RecordCount);
        Arrays_Zero;

        For X := 0 to qSubView.RecordCount - 1 do ASGR_D[X] := SGRD.Create;

        qSubView.First;

        while not qSubView.Eof do
        begin
          Arrays_Increase;

          Arr_DN[qSubView.RecNo - 1]              := qSubView.FieldByName('DelNote').AsString;
          Arr_DN_Item[qSubView.RecNo - 1]         := qSubView.FieldByName('PartNo').AsString;
          Arr_BroadCastName[qSubView.RecNo - 1]   := edtBroadcastIMV.Text;
          Arr_Hari_SeqNo[qSubView.RecNo - 1]      := qSubView.FieldByName('Hari').AsString;
          Arr_JobNo[qSubView.RecNo - 1]           := qSubView.FieldByName('JobNo').AsString;
          Arr_Symbol[qSubView.RecNo - 1]          := qSubView.FieldByName('Symbol').AsString;
          Arr_Part_Number[qSubView.RecNo - 1]     := qSubView.FieldByName('PartNo').AsString;
          Arr_Quantity[qSubView.RecNo - 1]        := '1'; //qSubView.FieldByName('DelQty').AsString;
          Arr_SA_Number[qSubView.RecNo - 1]       := qSubView.FieldByName('SAPNo').AsString;
          Arr_SA_Item_Number[qSubView.RecNo - 1]  := '10';
          Arr_GR_Qty[qSubView.RecNo - 1]          := '0';

          With ASGR_D[qSubView.RecNo - 1] do
          begin
            DN_NR          := Arr_DN;
            DN_ITEM        := Arr_DN_Item;
            BROADCASTNAME  := Arr_BroadCastName;
            HARI_SEQNO     := Arr_Hari_SeqNo;
            JOBNO          := Arr_JobNo;
            SYMBOL         := Arr_Symbol;
            PART_NUMBER    := Arr_Part_Number;
            QUANTITY       := Arr_Quantity;
            SA_NUMBER      := Arr_SA_Number;
            SA_ITEM_NUMBER := Arr_SA_Item_Number;
            GR_QTY         := Arr_GR_Qty;
          end;

          logFile.WriteLine(logNormal, 'Line added!');
          qSubView.Next;
          Application.ProcessMessages;
        end;

        ASGR_IN.SGRT.NO_OF_LINES := IntToStr(iRowCount);
        qView.Next;
      Finally
        ASGR_IN.SGRD := ASGR_D;
        
        ResultCode := WebService.Rec_SGR_IN(ASGR_IN);
        ShowMessage('Status Code: ' + ResultCode.STATUS_CODE + #13#10 + 'Received Date: ' + ResultCode.REC_DATE);
        ASGR_IN.Free;
      End;
    end;
  Except
    On E:Exception do
    begin
      logFile.WriteLine(logError, 'Error occurred in: procedure TfrmMain.DeliverNow;');
      MessageDLG('Error occurred in: procedure TfrmMain.DeliverNow2_;' + #13#10 + 'Message: ' + E.Message + #13#10 + 'Class Name: ' + E.ClassName, mtError, [mbOk], 0);
    end;
  End;
end;

Open in new window

soaperror.jpg
0
 
epasquierCommented:
I think this is a SOAP error caused by the strange content in your message : you mix the arrays in each SGRD line and the fact that those are arrays already.

- Forget completely your Arrays_Increase and Arr_DN ... globals.
- Take my code as a basis, and all you have to do is to make sure each field of each SGRD have a size of 1 element

Easiest way is, as I said, to augment a bit the SGRD class in unit WebService_SupplierGoodsReceipt
(gr-wsdl)

SGRD = class(TRemotable)
  private
   ...
//== Add this public section
  public 
    Constructor Create; 
    procedure SetFieldsLength(L:Integer);
//==    
  published  
    property DN_NR:          Array_Of_string  Index (IS_OPTN or IS_UNBD or IS_UNQL) read FDN_NR write SetDN_NR stored DN_NR_Specified;
    property DN_ITEM:        Array_Of_string  Index (IS_OPTN or IS_UNBD or IS_UNQL) read FDN_ITEM write SetDN_ITEM stored DN_ITEM_Specified;
    property BROADCASTNAME:  Array_Of_string  Index (IS_OPTN or IS_UNBD or IS_UNQL) read FBROADCASTNAME write SetBROADCASTNAME stored BROADCASTNAME_Specified;
    property HARI_SEQNO:     Array_Of_string  Index (IS_OPTN or IS_UNBD or IS_UNQL) read FHARI_SEQNO write SetHARI_SEQNO stored HARI_SEQNO_Specified;
    property JOBNO:          Array_Of_string  Index (IS_OPTN or IS_UNBD or IS_UNQL) read FJOBNO write SetJOBNO stored JOBNO_Specified;
    property SYMBOL:         Array_Of_string  Index (IS_OPTN or IS_UNBD or IS_UNQL) read FSYMBOL write SetSYMBOL stored SYMBOL_Specified;
    property PART_NUMBER:    Array_Of_string  Index (IS_OPTN or IS_UNBD or IS_UNQL) read FPART_NUMBER write SetPART_NUMBER stored PART_NUMBER_Specified;
    property QUANTITY:       Array_Of_string  Index (IS_OPTN or IS_UNBD or IS_UNQL) read FQUANTITY write SetQUANTITY stored QUANTITY_Specified;
    property SA_NUMBER:      Array_Of_string  Index (IS_OPTN or IS_UNBD or IS_UNQL) read FSA_NUMBER write SetSA_NUMBER stored SA_NUMBER_Specified;
    property SA_ITEM_NUMBER: Array_Of_string  Index (IS_OPTN or IS_UNBD or IS_UNQL) read FSA_ITEM_NUMBER write SetSA_ITEM_NUMBER stored SA_ITEM_NUMBER_Specified;
    property GR_QTY:         Array_Of_string  Index (IS_OPTN or IS_UNBD or IS_UNQL) read FGR_QTY write SetGR_QTY stored GR_QTY_Specified;
  end;


Constructor SGRD.Create; 
begin
 inherited;
 SetFieldsLength(1);
end;

procedure SGRD.SetFieldsLength(L:Integer);
begin
 SetLength(FDN_NR         ,L);
 SetLength(FDN_ITEM       ,L);
 SetLength(FBROADCASTNAME ,L);
 SetLength(FHARI_SEQNO    ,L);
 SetLength(FJOBNO         ,L);
 SetLength(FSYMBOL        ,L);
 SetLength(FPART_NUMBER   ,L);
 SetLength(FQUANTITY      ,L);
 SetLength(FSA_NUMBER     ,L);
 SetLength(FSA_ITEM_NUMBER,L);
 SetLength(FGR_QTY        ,L);
 FDN_NR_Specified:=L>0;         
 FDN_ITEM_Specified:=L>0;       
 FBROADCASTNAME_Specified:=L>0; 
 FHARI_SEQNO_Specified:=L>0;    
 FJOBNO_Specified:=L>0;         
 FSYMBOL_Specified:=L>0;        
 FPART_NUMBER_Specified:=L>0;   
 FQUANTITY_Specified:=L>0;      
 FSA_NUMBER_Specified:=L>0;     
 FSA_ITEM_NUMBER_Specified:=L>0;
 FGR_QTY_Specified:=L>0;        
end;

Open in new window

0
 
epasquierCommented:
and then in my code, you just have to fix the fact that the properties are arrays, and you want to set the first element
...
    while not qSubView.Eof do With ASGR_IN.SGRD[qSubView.RecNo] do
     begin
      DN_NR         [0] := qSubView.FieldByName('DelNote').AsString;
      DN_ITEM       [0] := qSubView.FieldByName('PartNo').AsString;
      BROADCASTNAME [0] := edtBroadcastIMV.Text;
      HARI_SEQNO    [0] := qSubView.FieldByName('Hari').AsString;
      JOBNO         [0] := qSubView.FieldByName('JobNo').AsString;
      SYMBOL        [0] := qSubView.FieldByName('Symbol').AsString;
      PART_NUMBER   [0] := qSubView.FieldByName('PartNo').AsString;
      QUANTITY      [0] := qSubView.FieldByName('DelQty').AsString;
      SA_NUMBER     [0] := qSubView.FieldByName('SAPNo').AsString;
      SA_ITEM_NUMBER[0] := '10';
      GR_QTY        [0] := '0';
      qSubView.Next;
     end;
...

Open in new window

0
 
Marius0188Author Commented:
Hi there,

Thanks for your assistance so far.

I've now implemented your suggestion but again - I can 100% follow your code suggestion as per comment #35738517.

But as for the rest I tried to follow your suggestions.

Now I am receiving an EDOMParseError.
Please see attached image.

I've also tried the following:
1. Add prefix and suffixes to all fields, single quote: '''' + FieldValue + '''';
2. Literal double quote (\"): '\"' + FieldValue + '\"';

But the error still persists.

Please help here.
:)
edomerror.jpg
0
 
epasquierCommented:
at this point it is not possible to help you without your full code so that we could try it on our own, play with it and *maybe* find what's going on
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 6
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now