Changing Sql Statement
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();
btEngine.Start();
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.
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();
btEngine.Start();
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.
0
-
Shotaro Ito
★ BarTender Hero ★
Hi SarahL,
Try this way..
[code]
Seagull.BarTender.Print.Database.OLEDB btdb = new Seagull.BarTender.Print.Database.OLEDB(btFormat.DatabaseConnections[0].Name);
btdb.SQLStatement = "SELECT `Model`, `Year` FROM `Sheet1$`";
btFormat.DatabaseConnections.SetDatabaseConnection(btdb);
[/code]0 -
Thank you 0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
2 Kommentare