How to run SQL queries from Access 2003?

nitin.chobhe

New member
Local time
Today, 15:24
Joined
May 12, 2009
Messages
6
Hi All,

I'm not able to run SQL queries from Access 2003.

I've coneected to MSDE (which is on the same machine I'm working on). I've selected a Database 'TastDB'. Now I want to run a script (containing 'Create Table') on TestDB from Access.

How can it be done? I've searched this forum as well as the Access help but couldn't do this.

I found following steps, but couln't found step 4 mentioned below (i.e. On the Query menu, point to SQL Specific). I don't see SQL Specific button there:
  1. In the Database window (Database window: The window that appears when you open an Access database or an Access project. It displays shortcuts for creating new database objects and opening existing objects.), click Queries
    default.aspx
    under Objects, and then click New on the Database window toolbar.
  2. In the New Query dialog box, click Design View, and then click OK.
  3. Without adding tables or queries, click Close in the Show Table dialog box.
  4. On the Query menu, point to SQL Specific, and then click Data Definition.
  5. Enter the SQL statement for your data-definition query. Each data-definition query consists of just one data-definition statement.
Can anybody help???
 
Is the query in design view at the time? It should look like the attached.
 

Attachments

  • QueryType.JPG
    QueryType.JPG
    54.6 KB · Views: 819
Thanks for your reply. Yeah, the query is in design view and it looks like as shown in the attchment.

~Nitin:confused:
 

Attachments

  • Query in Design View.jpg
    Query in Design View.jpg
    71.6 KB · Views: 442
Is this an ADP? I don't use them, but I suspect you can click on View to get into SQL view, and then enter your SQL.
 
Thanks again Pbaldy....

But I'm still not able to do that... I'm trying to get info from other forums. Once, I'm able to do that I'll update you.

If you happen to know something on this please let me know.

Thanks again...
~Nitin
 
But I'm still not able to do that
~Nitin
I have never used an ADP. But

to change your View - can't you click on the icon in your tool bar for this. In your picture you have two blue save icons. On the second one (the lower onw) you have an icon to the left of this. Can't you change views with this icon. (or does this only apply to MDB)
 
Hi darbid,

Thanks. It seem that it is applicable to MDB only. Cause there is no option to chnage the veiw as shown in the attachment.:confused:
 

Attachments

  • Save Button.JPG
    Save Button.JPG
    23.9 KB · Views: 303
What about the SQL button on the middle of that bar?
 
It just opens the SQL editor for the selected Table. It doesn;t allow to run Create, Update queries.
 

Users who are viewing this thread

Back
Top Bottom