[ADO] How to convert Array to Variant ?

BlackNAVBlackNAV Member Posts: 4
Hello to all. :)

This is my first post on this forum. \:D/

I'm a beginners developer with Navision and C/SIDE.

I want to use AddNew method of RecordSet in ADO (2.80) Automation library to insert data in a table of a DB SQL SERVER.

But AddNew accept two input parameters: FieldList and Values.

In ADO documentation that parameters are used as Array but in Navision are needed as Variant.

My little question is : there is a mode to convert a C/SIDE array to Variant for AddNew method ?


Thank's a lot. :D

Salvo Rapisarda

Comments

  • amunozsuamunozsu Member Posts: 30
    Hi,

    You could use an sql command instead:
    cadenaSql := STRSUBSTNO('INSERT INTO %1 (%2) VALUES (%3)', [tableName, fileds, values);
    

    Where fields and values are comma separated strings.

    -- Alejandro --
Sign In or Register to comment.