I tried it but when i try and fill the table with da.Fill(ds) i get an unknown db format on "C:\Estimating\maindb.mdf"

Is this not a suitable method for .mdf's? This is a SQL database.