none
vb.net running query in access 2013 RRS feed

  • Question

  • I have a question about running a query in access 2013. There basically is a vb.net 2010 desktop application that I am working on. This application actually passes queries to the access 2013 database and obtains the results using a dataset. I am trying to determine what the results of the query is in access 2013.

    Thus would you tell me how to copy and paste a query into access 2013 and get it to run. I do not want to use the query desinger for this reason. I just want to copy and paste the query into access 2013. Thus can you tell me how to accomplish this goal?

    Friday, August 14, 2015 9:55 PM

Answers

All replies

  • I'm  not familiar with vb.net but on the Access side of things you just go into SQL view of the Query interface to past your SQL. See image...Home / View / SQL


    Just takes a click to give thanks for a helpful post or answer.
    Please vote “Helpful” or Mark as “Answer” as appropriate.
    Chris Ward
    Microsoft Community Contributor 2012

    • Proposed as answer by ryguy72 Sunday, August 16, 2015 11:06 PM
    Saturday, August 15, 2015 4:13 AM
  • Just got to Queries > Design View.  Or View > SQL View.

    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

    Sunday, August 16, 2015 11:07 PM
  • Just got to Queries > Design View.  Or View > SQL View.

    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.


    Adding to the last two posts here from KCDW and ryguy, after you have created/pasted your SQL, you will select View again, then Datasheet View to see your results.
    Sunday, August 16, 2015 11:29 PM
  • When I try to click on view to see the SQL view, the dropdown view window has been disabled. Is there a way that I can have the view dropdown button work for me? If so, I will I enable that drop down view button? Are there other ways to run the sql? If so, can you tell me what those other options are?
    Monday, August 17, 2015 3:55 PM
  • 1) When I try to click on view to see the SQL view, the dropdown view window has been disabled.

    2) Is there a way that I can have the view dropdown button work for me? If so, I will enable that drop down view button?

    3) Are there other ways to run the sql? If so, can you tell me what those other options are?

    1) Is this a database you created? What is the file extension?

    2) You can try Rt+Click on the Queries' Tab and select it there.

    3) You can call the query to run from code or create a function instead.


    Just takes a click to give thanks for a helpful post or answer.
    Please vote “Helpful” or Mark as “Answer” as appropriate.
    Chris Ward
    Microsoft Community Contributor 2012

    Monday, August 17, 2015 8:37 PM
  • When I try to click on view to see the SQL view, the dropdown view window has been disabled. Is there a way that I can have the view dropdown button work for me? If so, I will I enable that drop down view button? Are there other ways to run the sql? If so, can you tell me what those other options are?

    I have a strong suspicion that you are attempting to create a query just in the Access interface without having actually created a database.  This is something you cannot do.  You must create a database first and work from within that db project. 
    Monday, August 17, 2015 9:44 PM
  • You are correct that I did not create the database. Someone else about 1o to 13 years ago created this database in access 2000.

    Thus is there a way that I can see the sql view?

    Monday, August 17, 2015 9:54 PM
  • Hi Wendy,

    We need to open the database use Access. You can just double click the database file, the Access would open it automatically.  Or you can open it via File->Open, then choose the exits database.

    And you may consider to convet database to the .accdb format, you can refere link below:
    Convert a database to the .accdb file format

    In addition, here are some helpful links for you learning Access:
    Basic tasks for an Access desktop database

    Access 2013 training courses, videos and tutorials

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, August 18, 2015 5:59 AM
    Moderator