I am using Visual Studio 2013, and in our project we are using more than 1600 store procedures. So when I expanding the store procedure from (View -> server explorer->select Database->expand stored procedure)server explorer, It is very difficult to find the store procedure, do we have any tools or other option to find the store procedure easier?
I am trying to search google but I can't found any tools or other options
You can view your stored procedure through ServerExplorer either in Visual stored or using Management Studio.
As the stored procedures are available within the ServerExplorer you have no other option rather waiting for them to get opened via ServerExplorer.
This is same as can we view tables without using server explorer
using .dbml :
Any changes you make in SQL server are not auto-synched to your .dbml file. If you make table or stored procedure changes you need to delete them from the .dbml file and add them again.
Related
I have to modify a web site originally written in VS 2010 and is now maintained in VS 2013. All the linkages to the database (Sql Server) stored procedures were set up in VS 2010. I have to change a stored procedure to accept an additional parameter which I do in SSMS, however the table adapter in VS 2013 isn't "seeing" the change and the web site code refuses to build. The code creating, calling the stored procedure via an adapter is:
Order_tTableAdapter tblOrderRsr = new Order_tTableAdapter();
tblOrderRsr.eTicket_CreateOrderRecord(userID, eventID, eventDateID, "", tktOrderType, 0, 0, 0,
Email, SIFNAme, SIMI, SILNAme, "", SIAddr1, SIAddr2, SICity,
SIState, SIZip, "", BIFNAme, BIMI, BILNAme, "", BIAddr1, BIAddr2,
BICity, BIState, BIZip, "", "", CustFieldLabel1, CustFieldValue1,
CustFieldLabel2, CustFieldValue2, CustFieldLabel3, CustFieldValue3,
ref guidRsvID);
I assume that I have to somehow update these linkages to the database but cannot find anything in VS 2013 that will allow me to do that. I have a connection to the database in VS 2013 (Sql Server Express 2012) and can see all the tables and stored procedures, but there isn't any obvious way to update VS 2013 with the changes to the stored procedures (or any changes in the structure for that matter). How does one make these changes?
Figured it out.
All the table adapters were created in VS 2010 using the visual designer that is no longer used in VS 2013, BUT (apparently) they did leave the visual designer in VS 2013, you just can't get to it through the menu system. When the table adapters were created, a file with all that information was created with the name <YourAppName>.xsd, this file is located in the App_Code folder of the project. Double click on the file and VS 2013 will open the designer and you can modify the adapters. Just locate your adapter name and right click on the stored procedure/command located in that adapter and click Configure to modify it.
I created a test WinForms app in Visual Studio 2013 Premium (admin) & Update2. Enabled SQL Server debugging. Created a data connection to my local Northwind database. I am admin on the box. Expanded the stored procedures list and right clicked on several SP's and I was expecting a 'step into Stored Procedure' option and it doesn't exist. I am following the steps from here.
I right clicked on the connection name and there's no enable SQL/CLR debugging option. I read about references to SQL Server Object Explorer which is under Server Explorer and that's missing too. I am using SQL Server 2012 Developer edition.
Why am I missing all these options?
You might need to install SQL Server Data Tools for Visual Studio:
http://msdn.microsoft.com/en-us/data/hh297027
I can't find the SQL view in Access 2010 when I open the .mdb(access 97 format) database file created with Visual Basic 6 inbuilt database.
It works fine when I open a new database document ** (.accdb) ** in Access 2010, but that version of the access file (.accdb) is not supported in Visual Basics 6.0.
I know it's weird that I still use VB6 but I have no other go since my university only allows to use VB6.
So, is there any way I can solve this issue?
Thank you.
I am not sure what you mean by "can't find SQL view". You can open mdb files in Access 2010 and edit queries using both the query designer and also the SQL editor.
It is also possible to open accdb files using VB6. Here is the proper connection string:
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccess2007file.accdb;
Persist Security Info=False;
Taken from:
http://www.connectionstrings.com/ace-oledb-12-0/standard-security/
I'm looking for a way to debug the stored procedures that SharePoint uses. I would like to get an idea what is happening on the database side. The COM Exception message is pig-useless (0x8004005, which means generic problem - hurrah) and I would like to see what is going wrong on the other side as I can't muck around in the COM Component itself.
While I followed the description on how to setup VS for debugging the SQL Server they somehow all assume I can call the stored proc myself. I'm looking for either a Debugger.break()-style T-SQL call or something similar. Any ideas?
You can debug a stored procedure on SERVER only and NOT on CLIENT.
If sql server is installed on server, and in your local PC you have only SQL Server Management Studio is installed, you can not debug stored procedure in your local PC.
You need to go to server and there you can debug stored procedure in SQL Server Management Studio like this:
Open stored procedure in SQL Server Management Studio.
Click "Start Debugging" from Debug menu.
I am currently modifying a web application to use a MS SQL 2008 database with will be located in the app_data folder and auto-attached. Everything is fine and I can connect to the database and query it from within the application and also Visual Studio.
Although I need to also create/update some triggers and stored procedures, which I can not do - every time I choose the 'Add new stored procedure' from the right click menu in Visual Studio's Server Explorer menu, it creates a new template but I am unable to execute it, as there are not options enabled on the 'Query Designer' tool bar.
Maybe I am doing something completely wrong, but surely it should be just a case of creating my stored procedure and then clicking an execute button?
If you have never used Server Explorer for any database schema editing in Visual Studio and have previously only used SQL Server Management Studio, all I can say is that it is very unintuitive!
From within SQL Server Management studio, you create the procedure using the usual 'CREATE PROCEDURE' code and then execute it, if you happen to click the save button you are able to save a local copy as a .sql file, but doing so will not change anything within the database.
In Visual Studio's Server Explorer however, there is no way to execute any SQL, you can not execute any 'CREATE PROCEDURE', 'ALTER TRIGGER', etc. If you want to make changes to an object you have to click save instead - which is certainly not what you would do from within SQL Management Studio!
Microsoft certainly don't make simple tasks easy!
Select the SQL that you want to run (CTRL + A to select all), then right-click on it and choose RUN SELECTION. I can't, however, find any equivalent short-cut key.
Robert Harvey's answer was news to me, I admit, and is just weird. You can only "save" a query which begins with the word CREATE, it appears - and it's contrary to every principle of SQL that you can do so!