Click here to Skip to main content
16,021,115 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Which namespace is used in Docmd.openquery and where is it used?

Please answer my question... I don't know where and how it is used.
Posted
Updated 8-Jun-10 1:38am
v2

Well, set a reference to COM library

Microsoft Access x.x Object Library

Then something like

using Access = Microsoft.Office.Interop.Access;

Access.Application app = new Access.Application();
app.DoCmd.OpenQuery("YourQueryName");



Don't really know why you'd want to do this though!
 
Share this answer
 
Comments
mehalanandu 8-Jun-10 8:42am    
thank u for ur response...actualy ,my Qn is after 6 month the datas are automaticaly deleted from sql2005 ...for tis only i used these codes...plz clarify my Qn
Dylan Morley 8-Jun-10 8:44am    
If you're using SQL2005, you definitely don't need any Access functionality! Just schedule a job to run on the server that executes SQL to delete data that matches your aged criteria.
mehalanandu 9-Jun-10 5:21am    
thank u for ur response
That's an Access command, used in Microsoft Access VBA code.

Are you automating Access from .NET?
 
Share this answer
 
v3
Comments
mehalanandu 8-Jun-10 7:48am    
thanks....but it is not automaticaly generat ..tel me plz

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900