คำตอบ Using The Query Designer with SQLCE 4.0 in VS 10

  • 24 เมษายน 2555 20:41
     
     

    When using the Query Designer to create queries for SQLCE 4.0, and saving them I cannot find where the queries are saved.  Right clicking on the Query builder tab and clicking 'Copy Full Path' gets back the path: "DataExplorer://MarsReports.sdf/Query9", which I cant find on my computer.

    Can someone explain how one saves the text of a query completed in the Query Designer?

    Thanks,


    Tom Childers, Radio Amateur N5GE, Licensed since 1976, QCWA Member 35102, ARRL Life Member

ตอบทั้งหมด

  • 25 เมษายน 2555 7:04
    ผู้ดูแล
     
     
    Hi Tom Childers, N5GE

    Regarding to your description, you have two options for saving the query:
    o You can save the changed query. From the toolbar, choose  Save Query.
    o You can save the changed query as a new query. From the toolbar, choose  Save Query As. Enter a new technical name, a new short text and a new description.

    But there is an option could be (not a good one however), to save the SQL script in any text editor, and when you want to edit again in Query Designer, just copy/paste the script from the text file into the SQL pane in Query Designer.

    Or what I would consider a better approach is to copy the text, open Query Analyzer and paste it in there. From within Query Analyzer, you have the option to save and open queries. In Query Analyzer, from the menu just do a file, open to open the saved query file. By default, Query Analyzer uses the .sql extension for query files. You can use another file extension but .sql is commonly used and probably a good route to go.

    Regards,
    Amber zhang
    TechNet Subscriber Support

    If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback here


  • 27 เมษายน 2555 10:55
     
     
    Hi Tom Childers, N5GE

    Regarding to your description, you have two options for saving the query:
    o You can save the changed query. From the toolbar, choose  Save Query.
    o You can save the changed query as a new query. From the toolbar, choose  Save Query As. Enter a new technical name, a new short text and a new description.

    Good morning Amber,

    Please read my question very carefully. Choosing Save Query from the tool bar appears to save the query, but I am unable to find where the query is saved.  What I am really wanting to know is which folder the query is saved in.  Without knowing that I won't ever be able to use the query.

    Thank you,


    Tom Childers, Radio Amateur N5GE, Licensed since 1976, QCWA Member 35102, ARRL Life Member

  • 30 เมษายน 2555 7:36
    ผู้ดูแล
     
     
    Hi Tom Childers, N5GE

    Thank you for your update. Basically the default location for saving results you can check following: Tools-->Options-->Query Results-->Default location for saving query results--> <Your path>

    According to my test, I saved a query in SSMS and the path is: C:\Users\username\Documents\SQL Server Management Studio.

    Hope it’s helpful.

    Regards,
    Amber zhang

    TechNet Subscriber Support

    If you are TechNet Subscription user and have any feedback on our support quality, please send your feedbackhere


  • 4 พฤษภาคม 2555 15:33
     
     

    My apologies, Amber, I should have mentioned the query designer I am using is the one in VS 2010.  I think you have been thinking I'm asking about SSMS.

    Please look at the process in VS 2010

    Thank you


    Tom Childers, Radio Amateur N5GE, Licensed since 1976, QCWA Member 35102, ARRL Life Member

  • 5 พฤษภาคม 2555 18:11
    ผู้ดูแล
     
     
    Select File, Save As, and save in a place of your choice !?

    Please mark as answer, if this was it. Visit my SQL Server Compact blog

  • 6 พฤษภาคม 2555 17:38
     
     
    Select File, Save As, and save in a place of your choice !?

    Actually there is no Save As... menu item when the Query designer is open...

    Steps to duplicate the behavior:

    1. In the Server Explorer right click on an existing database.  SQL Server or SQL Server CE. It doesn't matter which type.

    2. Select New Query from the menu.Open Folder Error

    3. Choose a table from the Add Table Dialog, click Add and close the Dialog.

    4. Create a select script  with the designer and run it.

    5. Click the File menu on VS 2010.  There is no Save As... menu item.

    6. On the Edit tool bar on VS 2010, Click the Save All Icon.

    7. Right click the Query Designer Tab.

    8. From the resulting menu, click the attached Message box appears....

    9 Right click the Query Designer tab again.

    10. Click the Copy Full Path menu item.

    11.Open a text file and paste to.  You will see a path similar to this one: DataExplorer://MarsReports.4.0.sdf/Query3.

    Now back to the original question with one additional question which is: Where is the path, DataExplorer://MarsReports.4.0.sdf/Query3 ???

    I cannot find this path on my computer.  Using Windows 7 Pro file search does not find the  path.


    Tom Childers, Radio Amateur N5GE, Licensed since 1976, QCWA Member 35102, ARRL Life Member


    • แก้ไขโดย Tom Childers, N5GE 6 พฤษภาคม 2555 18:00 Added image URL
    •  
  • 7 พฤษภาคม 2555 6:37
    ผู้ดูแล
     
     คำตอบ

    Sorry Tom, there are actually 2 Query editors in VS 2010 Premium/Ultimate, and I was refereeing to the other one - Found under Data, Transact-SQL Editor.

    I think for the one you mention, you must use Copy and Paste to save.


    Please mark as answer, if this was it. Visit my SQL Server Compact blog

    • ทำเครื่องหมายเป็นคำตอบโดย Tom Childers, N5GE 7 พฤษภาคม 2555 15:52
    •