BarTender .NET SDK Does Not Refresh and Recognize Ordering of Database Fields Follow

Avatar
Jasper Wen

Symptom

For a text file database, the order of the database fields/columns when using BarTender .NET SDK may not follow the same order and arrangement as during design time while printing directly in BarTender Designer.

Environment

  • BarTender Automation Edition and above
  • BarTender .NET SDK
  • Text File Database

Solution

You can use the following BarTender .NET SDK methods and executed them in the following order so that BarTender reorders the database fields for a text file database to match the same order and arrangement in BarTender Designer.

  1. The TextFile.UseFieldNamesFromFirstRecord and any text file/database related properties must be set first.
  2. The DatabaseConnections.SetDatabaseConnection method has to executed after.
  3. Finally, the PrintSetup.ReloadTextDatabaseFields property can be set to true.

Additional resources

The following post from BarTender community may be helpful with this issue.

 

Please sign in to leave a comment.