null ref exeception

Apr 21, 2011 at 4:28 PM

hello,

i am attempting to use chunktransporter and i have the following code

using (var dbConn = new SqlConnection(DbConnectionString))
            {
                dbConn.Open();
                using (var a = new SqlDataAdapter(ServiceHelper.SiteConfig.KpiQuery, dbConn))
                {                  
                    var table = new DataTable("KpiData");
                    log.Info("retrieving kpi data for practice");
                    TableManifest tableManifest=null;
                    a.Fill(table);
                    try{
                        tableManifest = new TableManifest(ref table);
                    }
                    catch(Exception ex)
                    {
                       log.Error(ex.ToString());
                    }
                    return tableManifest;
                }
            }

on the line tableManifest = new TableManifest(ref table); i get null reference exception, my datatable definately has data as i have debugged through the code.

Any ideas

Regards

Ismail