AllianceMaterials
AllianceMaterials

Reputation: 35

C# working with access errors

I am not sure why but in c# the DLG is an error as well as dao. can some one help me resolve these issues ?

Error 1 The type or namespace name 'dao' could not be found (are you missing a using directive or an assembly reference?) c:\users\dhelm.allmatinc.001\documents\visual studio 2013\projects\allianceerp\allianceerp\form1.cs 1074 13 AllianceERP

           app.OpenCurrentDatabase(dlg.FileName, false, "");

           dao.Database db = app.CurrentDb();
           dao.Recordset rs = db.OpenRecordset(sql, Type.Missing, Type.Missing, Type.Missing); 

how do i properly use this

Upvotes: 0

Views: 102

Answers (1)

jyanks
jyanks

Reputation: 2396

The sample that you are using from code project is missing an import. The DAO library should be referenced, it can be downloaded from here. It should be noted that this is a deprecated library. I'm not sure exactly what you're trying to accomplish, but this library is probably not the best way to go about solving this anymore (the article is from 2007).

Upvotes: 0

Related Questions