Exporting Data Into DBF File Format From NAV

myanilkumarmyanilkumar Member Posts: 108
Hi All,

I need to export some data into DBF file format. I am getting data from multiple tables in NAV. I tried this code.


CREATE(DBFConnect);
DBFConnect.Open('Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + RetailSetup."Label File Path" + ';Extended Properties=DBASE IV;');
DBFConnect.Execute('Create Table ItemLabel (ITEM char(20), DESCRIPTION char(60), CROSSREFERENCE Char(20))');

DBFConnect.Execute('Insert into ItemLabel Values(ItemNo,ItemDesc,CrossrefNo');

But I Stuck near Insert Statement. Please help me on this. Please advise if you have any other easy method.

Regards,

Anil

Comments

  • canadian_baconcanadian_bacon Member Posts: 91
    SQLStatement := 'INSERT ' +
    'INTO ItemLabel.DBF ([ITEM], [DESCRIPTION], [CROSSREFERENCE]) ' +
    'VALUES (' + '''' + ItemNo + ''',' +
    '''' + ItemDesc + ''',' +
    '''' + CrossRefNo + ''')';

    DBFConnect.Execute(SQLStatement);
Sign In or Register to comment.