Update link to stored procedure - visual-studio-2013

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.

Related

Visual studio 2013 server explorer procedure find tool

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.

Can't debug stored procedures in Visual Studio. 'Step Into Stored Procedure' is missing

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

Can't view database objects in SQL 2008 Database Project within Visual Studio 2010

I've created a SQL 2008 database project in Visual Studio 2010. I have imported existing tables and stored procedures using both of the available methods of import (script or connecting to db). Regardless of which method I use, after the import completes I see my table files in the Visual Studio project, however, I get the following error when trying to view the object by double clicking on it:
Object reference not set to an instance of an object.
I can also see the files I am trying to access on the hard drive. Perhaps this is a permissions issue masked with an obscure error message? I've done some research and am stumped at this point. Any assistance is greatly appreciated.
Details on Visual Studio 2010: Version 10.0.40291.1 SP1Rel
My OS is: Windows Server 2008 R2 Standard
Thanks!
Starting VS 2010 with "devenv /ResetSkipPkgs", should help, mostly due to the "non-loading problem" of some of the key modules.

Visual Studio 2010 cannot find SQL Server 2008 R2

I installed SQL Server 2008 R2 and I already have Visual Studio 2010.
When I try to connect to the SQL Server there exists no server on my Add Connection while my database engine works properly.
Why is that so?
As far as I can tell, in Server Explorer, you need to click the "Connect to Database" toolbar icon (or right-click Data Connections and choose "Add Connection...").
From the Data source list, choose Microsoft SQL Server and then click Continue. The Add Connection dialog box displays so you can enter your server name (machinename\instancename). You can choose between Windows or SQL Server Authentication (depends on how you set it up, but Windows Authentication should work for a local installation).
Once you have entered a correct server name and credentials you'll get a list of databases to choose. Select one if you wish and click OK. That should get your server added to the list for Visual Studio 2010.
The issue is that is VS 2010, you need to type in your localhost instead of choosing the connection from the drop-down list. I hope this issue is resolved in the next releases.
I believe if from VB 2010 you go to Project >> Add New Item and choose the appropiate path for your server it should work.
You may also want to try Data >> Add New Data Source

I have problem with create .mdf file in VS 2010

When i trying to create. Mdf file in App_Data folder in visual studio 2010 I see this message.
"Failed to generate user instance of SQL Server due to an error when starting the process for an instance of the user. The connection will be closed."
I can to create the database other ways. (In visual studio -> Tools-> Connect to the database and SQL Manager). SQL Server is installed automatically studio.
How can I solve this problem?
What am I doing wrong?
This is not exactly an answer to your question, however I think it is very important you read this link first before attempting any further resolutions to your problem.

Resources