Changing Sql Statement S’abonner

Legacy Poster

I am new to Bartender using the trial edition. I am trying to evaulate the software to see if its the correct solution for us.
I am using Visual Studio 2010, c#

I need to dynamically create the SQL at print time. I have been looking at examples. All seem to have the following type of code.

BarTender.Application btApp
BarTender.Database btDb;
BarTender.Format btDoc;
btApp = new BarTender.ApplicationClass();
btDoc = btApp.Formats.Open("Labels.btw", false, "");
btDb = btDoc.Databases.GetDatabase(1);

My problem is I do not have any reference to Databases.GetDatabase

I am trying

Engine btEngine = new Engine();
LabelFormatDocument btFormat = btEngine.Documents.Open(LabelFileName);
Seagull.BarTender.Print.Database.OLEDB btDb;

But then I become lost in assigning anything to btDB.

Any help would be greatly appreciated.

2 commentaires

Shotaro Ito
Actions pour les commentaires Permalien

Hi SarahL,
Try this way..
Seagull.BarTender.Print.Database.OLEDB btdb = new Seagull.BarTender.Print.Database.OLEDB(btFormat.DatabaseConnections[0].Name);
btdb.SQLStatement = "SELECT `Model`, `Year` FROM `Sheet1$`";
Legacy Poster
Actions pour les commentaires Permalien

Thank you

Vous devez vous connecter pour laisser un commentaire.