Retrieving Purchase Order From Tally in c#

Discussion in 'Tally Integration' started by Jacob99, Apr 12, 2016.

    
  1. Jacob99

    Jacob99 New Member


    Hi All,


    I am using the following code to retrieve PO from tally erp 9.0 in c#.

    I have created a text file and added the following code in txt file and txt file is added to Tdl configuration.

    [Collection:purcCollection]

    Type:Vouchers:VoucherType
    Child Of:$$VchTypePurcOrder
    Fetch: PartyLedgerName,VoucherNumber, Date, Amount
    Is ODBC Table:Yes


    the following is the c# code used

    OdbcConnection TallyCollectionConnection = new OdbcConnection("Dsn=TallyODBC_9000");
    // from Ledger
    TallyCollectionConnection.Open();

    // OdbcCommand TallyCommand = new OdbcCommand("Select * from TTESTER.TallyUserser.StockItem where $parent='DELIVERY PANELS'", TallyCollectionConnection);
    OdbcCommand TallyCommand = new OdbcCommand("Select * from purchaseregister", TallyCollectionConnection);
    OdbcDataAdapter TallyDataAdapter = new OdbcDataAdapter(TallyCommand);

    DataSet TallyDataSet = new DataSet();
    //TallyDataAdapter.Fill(TallyDataSet);
    TallyDataAdapter.Fill(TallyDataSet);
    int i= TallyDataSet.Tables[0].Rows.Count;
    //DataTable dt = new DataTable();
    //string[] restrictions = new string[1];
    //dt = TallyCollectionConnection.GetSchema("Tables");
    TallyCollectionConnection.Close()


    I am not getting any data in c#.Is there any way to get purchase order from tally in c#.
    can we get the same in xmlrequest

    Can you please guide me on this

    Thanks,
    Jacob




     


Share This Page