Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop MS Access from changing my SQL code?

Tags:

ms-access

I've wrote an SQL query in MS Access and Access made a mess of it, only to show it "graphical". How do I stop it from doing this?

like image 231
Totty.js Avatar asked Apr 14 '11 13:04

Totty.js


People also ask

Does Microsoft Access use SQL Server?

Relational database programs, such as Microsoft Office Access, use SQL to work with data. Unlike many computer languages, SQL is not difficult to read and understand, even for a novice. Like many computer languages, SQL is an international standard that is recognized by standards bodies such as ISO and ANSI.

How do you turn off parameters in Access?

Stop the request for a parameter value To stop the Enter Parameter Value dialog box from appearing, you must inspect any expressions that are associated with the object that you're working with, and find the identifier that is causing the dialog box to appear.

How can I get SQL code from MS Access?

To view the SQL, go to the Home tab. Select SQL View from the View menu and you will see the SQL of your query.

Why should he get the Microsoft SQL Server instead of Access?

More concurrent users SQL Server can handle many more concurrent users than Access and minimizes memory requirements when more users are added.


1 Answers

There's no stopping Access from changing your SQL if you save it as a QueryDef object (ie, using the graphical query editor). You have (at least) two other options:

  1. Build your queries in VBA
  2. Store your queries in a table dedicated to queries using a Memo field to store the SQL (this will also require some VBA to take the SQL and execute it or assign it to a temporary querydef, etc.)

You can still use the QBE (query-by-example) window to generate your SQL initially if you want.

Also, if you have a non-Jet backend (MS SQL Server, for example) you can write pass-through queries. You lose the graphical interface but gain all of the functionality of writing SQL in your backend of choice. Access won't rearrange the formatting on pass-through queries.

like image 185
mwolfe02 Avatar answered Nov 12 '22 15:11

mwolfe02