3

Since MS Access can save a query in the database file I assume there is a way to do this programmatically from C#. Any idea how?

Juan
  • 15,274
  • 23
  • 105
  • 187
  • What do you mean by "Save a Query"? Save the SQL that you sent to the database, then run it later? – Mikey Mouse Jun 26 '13 at 16:38
  • Yes. In MS Access for instance you have a list of tables and a list of queries. These queries can only be stored in the database file since when you close it and re open it they're still there. – Juan Jun 26 '13 at 16:42
  • you find it or not yet ?? @Juan – reguieg younes Jul 20 '20 at 19:03

1 Answers1

0

Looks like it's not possible. SQL Server doesn't record queries, according to This (Not sure about other databases, but I imagine they all work the same way)

You'd need to manually store them as a varchar in a table

Community
  • 1
  • 1
Mikey Mouse
  • 2,968
  • 2
  • 26
  • 44
  • But then how do you explain MS Access storing queries in the database file? SQL Server is different than the JET Engine. – Juan Jun 26 '13 at 16:58