跳至主內容

搜尋

搜尋

Vb6 Set Database

評論

2 條評論

  • Avatar
    Legacy Poster

    This is C# version. It works but I couldnt manage it to work in VB6.   

     

                Seagull.BarTender.Print.Database.TextFile tf = new Seagull.BarTender.Print.Database.TextFile(labelFormat.DatabaseConnections[0].Name);


                tf.FileName = Path.GetFullPath("data.txt");


                labelFormat.DatabaseConnections.SetDatabaseConnection(tf);


                labelFormat.PrintSetup.ReloadTextDatabaseFields = true; // Fix when field order is different from design time


     

                // Print


                labelFormat.Print();

     

    VB6 version: it runs without any error but does not print.

        Dim btDb As BarTender.Database    
        Set btDb = btKocanFormat.Databases.Item(1)
        btDb.textFile.FileName = App.Path & "\data.txt"
        btDb.textFile.UseFieldNamesFromFirstRecord = True
        btDb.textFile.FieldDelimiter = btDelimComma
        btKocanFormat.UseDatabase = True
         
        btKocanFormat.PrintOut False, False
    
     

    Any help?

    0
  • Avatar
    Legacy Poster

    Using Bartender, clearing and resetting the database on the format file solved the problem.

    0

登入寫評論。