Sets an ADO.NET DataTable as a data source to bind to template data markers.

public void BindData(System.Data.DataTable dataTable, String dataSourceName, PowerPointWriter.DataBindingProperties bindingProperties)
Public Overridable Sub BindData(ByVal dataTable As System.Data.DataTable, ByVal dataSourceName As String, ByVal bindingProperties As DataBindingProperties

The DataTable to use as the data source.

The name of the data source.

A DataBindingProperties object.

          OleDbConnection Conn = new OleDbConnection();
          DataTable EmployeeDt = null;
          DataBindingProperties dataProps = pptt.CreateDataBindingProperties();
          try
          {
               Conn.ConnectionString = Application["connstring"].ToString();
 
               //--- SQL Query for employee information
               string EmployeeSQL = "SELECT FirstName + ' ' + " +
                    "LastName As Name, Title " +
                    "FROM Employees WHERE EmployeeID=?";
               OleDbCommand CmdEmployee = new OleDbCommand(EmployeeSQL, Conn);
               CmdEmployee.Parameters.Add("@EmployeeID", EmployeeId);
               OleDbDataAdapter AdptEmployee = new OleDbDataAdapter(CmdEmployee);
               EmployeeDt = new DataTable();
               AdptEmployee.Fill(EmployeeDt);
          }
          pptt.BindData(EmployeeDt,
               "Employee",
               dataProps);
          Dim Conn As New OleDbConnection()
          Dim EmployeeDt As DataTable = Nothing
          Dim dataProps As DataBindingProperties = pptt.CreateDataBindingProperties()
          Try
               Conn.ConnectionString = Application("connstring").ToString()

               '--- SQL Query for employee information
               Dim EmployeeSQL As String = "SELECT FirstName + ' ' + " & _
                    "LastName As Name, Title " & _
                    "FROM Employees WHERE EmployeeID=?"
               Dim CmdEmployee As New OleDbCommand(EmployeeSQL, Conn)
               CmdEmployee.Parameters.Add("@EmployeeID", EmployeeId)
               Dim AdptEmployee As New OleDbDataAdapter(CmdEmployee)
               EmployeeDt = New DataTable()
               AdptEmployee.Fill(EmployeeDt)
          End Try
          pptt.BindData(EmployeeDt, _
               "Employee", _
               dataProps)