.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Set local var with sp

Posted By:      Posted Date: October 15, 2010    Points: 0   Category :Sql Server

I want to use a stored proc return value to populate a local variable.  I am using the declare below but I am getting a syntax error on the EXEC. Can someone tell me how to fix this?  Thanks.

SET @WorkerLinkID = (EXEC mc_insPeopleLink @PersonID=@WrkPersonID, @Branch=@Branch, @PeopleStart=@StartDate, @CategoryCode=2);

View Complete Post

More Related Resource Links

Local variable scoping in C#

In my previous post, Compiler-generated scopes for local variable declarations, I briefly touched on the issue of multiple meanings applied to the same name. In this post, I'll aim to flush out the compiler's rules with regards to binding names in their local scopes.

Compiler-generated scopes for local variable declarations

I was tasked with understanding and fixing a bug on error reporting with foreach iteration variables the other day, and it got me thinking about local variable scoping rules in C# in general. First, the bug.

How to authenticate local user usin ldap or non domain authentication



I created one application, and I need to authenticate local user. This user is the user who is login to his/her Personal Computer.. Main thing his that he/she does not in any DOMAIN... I want NON-DOMAIN authentication.. any how.... please help...

Changing from Local to WCF


I've been handed an application thats connection string implies a local host connection.

I want to make this connection a remote connection, to a database located on a Server.  I want the client and server to be able to communicate with one another remotely, instead of a local connection.

How does one create the Data Service, and establish end points to Server and Client?  Is it as simple as creating a contract (which I have limited knowledge on constructing), between the two locations, setting up the dataservice, security, and ratifying the 'connetions'?

A smidge of insight, please ;-)

Foundations: Workflow Services for Local Communication


This month's column describes how to use WCF for communication between a workflow and a host application in Windows Workflow Foundation 3. This knowledge should help developers with their efforts using WF3 and prepare them for WF4, where WCF is the only abstraction over queues (referred to as "bookmarks" in WF4) that ships with the framework.

Matthew Milner

MSDN Magazine November 2009

Trying to launch a .exe file on my local computer from intranet site.


I have been told I can launch a local program on my PC from my intranet site but it has to be done with Active X or vbscript and not javascript.  I found the following little sample html code that will launch notepad.  However, I cannot figure out how to put this in a button, etc., within my aspx or code behind to execute it.  Does anybody have any idea how to do this?  I have a lot of javascript code I am launching urls with and I have even tried using that but again, I have been told that to do it client side it needs to be vbscript or something like this.  Any ideas?

  <title>Web page that runs EXE files</title>
  <h1>Web page that runs EXE files</h1>
  <p>Click <a href="file:///C:/windows/notepad.exe" class="navbar">here</a>
  to run notepad.exe (Windows XP, ME, 98, 95)</p>
  <p>Click <a href="file:///C:/winnt/notepad.exe" class="navbar">here</a>
  to run notepad.exe (Windows 2000, NT)</p>


Pick up old local users on new server with new local users with same name


Hi, All!

I has old server with name "test", worked with SQL server 2008 and Sharepoint 2007 SP2. There was five users like "user1", "user2", etc. They have content on main page "http://test" and some data at mysite host "http://test:81". Well I create new server with the same name "test", create all users "user1", "user2", etc, then i add them to shared services profiles with the same names like in old server. Then from old server backup content base from MS SQL server for applications on 80 and 81 port, and restore them on new server. Then I make commands "stsadm -o addcontentdb -url http://test -databasename wss_content_80" and "stsadm -o addcontentdb -url http://test:81 -databasename wss_content_81". Then I delete databases which created when i create new web applications from sharepoint central administration. and did iisreset. Well all data and settings picked up, BUT all user ID were old. So question is: how i can compare old users to new? I want to compare old and new users everywhere in DBs wss_content_80 and wss_content_81. Like replace old ID with new ID

How to connect to local instance of SQL Server 2008 Management Studio Express ?


I just installed SQL Server 2008 Management studio Express on my Vista machine.

i tried connecting to local machine using :

.\sqlexpress, (local)\sqlexpress, or .\SQLExpress, MyPCNAME\SQLExpress

nothing is working, getting this error:

Cannot connect to PC-NAME\SQLEXPRESS. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

can blackberry browse local websites


Greetings,  :smileyhappy:

 I am a vb.net developer using visual studio 2010 and sql server 2005 express, windows 7.

 Blackberry device that I am using is 8520. Now I have configured my blackberry to use wifi and I can connect to the internet successfully using my 8520. My development computer is also connected to the same router via ethernet cable, a normal lan cable.

 I have developed a test application and I would like to browse the application from my device using my wifi connection to connect to my development pc. My blackberry device is set to automatically obtain an IP address and my wireless router dchp is enabled. My dev pc IP is

 So in the blackberry browser I type I should get the default IIS7 page. I don't get that. If I type I don't get my test page. I turned off my anti virus also and windows firewall but I still cannot navigate to the page.

 I cannot use the visual studio blackberry plugin because it does not support visual studio 2010. All I want to do is browse my test

Adding a Chart to a Local Report


Dear All

I have created a report as a local report which looks like this:

I'm trying to add a chart to this report and I'd like it to display something like this (so sorry for the crude drawing):

It seems like it should be quite straight forward but I've tried dragging the fields into the chart all different ways and can't make it happen. I'm using Visual Studio 2010 and here's what my list of fields from the dataset look like:


I thought ObservationYear would be the series and all the other fields would be the data but this doesn't work. It produces a chart like this which wasn't what I was hoping for:

Please could you help me understand what it is I'm doing wrong? I'm very grateful for any help/advice you might be able to provide.

Kind regards








Local Report - nested objects



I trying to use Object data source for my local report. But the problem is that the datasource is having nested objects and I am not able to access the properties of the nested object.

I tried using =Fields!HomeAddress.Value.Zip as mentioned on this site


but couldn't get it working. Its returns #Error for this field.

I am using visual studio 2010 for developing this report

Please help.






smtp is noe sending email instantly,it makes a Queue in my local system

I am using a  smtp to send email from asp.net (C#)code.it sending some email instantly but many of email is making a queue in my Inetpub folder at local system.what could be the issue ? please help me to get rid from it.ThankxArvind

Failed to generate a user instance of SQL Server due to failure in retrieving the user's local appl

Hi ,From the last few days I am struggling with the error "Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed."I hav created an asp.net web application with membership shcema. It works fine an my developement machine but when I published it on my web server. It is giving me above error for which I searched but not found any help.Can anyone help me with this.

Getting Local Machine Info from Web Service

Hi there, im pretty new to using web services and i have an application which connects to a webservice, the problem is however is that i need to be able to get the local machine info e.g machine name, drives etc...from the webservice and i have no idea how to do this! Any help would be much appreciated!Phil

how to change a remote partition into local partition

Our production cube is very huge and the process time is very long (10+ hours), and the data volume is still increasing. Since we have some idle server during cube process period, I'd like to try to put some partitions on the idle server to cut the process time. But I also want to bring these remote partitions back to local after the process is completed. Is it possible to change partition from remote to local? if so, how?

Can't Create ODBC to Local SQL Server Express 2008

Hello. I have SQL Server Express 2008 SP1 LOCALLY on my Windows XP Professional SP3 box. I have databases already created in Access 2007 that I imported into SQL. Now I want to keep the front end Access forms for data entry but have them connect to the databases in SQL. What I can't seem to do is connect from Access to the SQL db's because I can't create the ODBC connection. When I try to connect, I get the following two 'Connection failed' errors: 1. SQLState: '08001' SQL Server Error: 10061 [Microsoft][SQL Server Native Client 10.0]TCP Provider: No connection could be made because the target machine actively refused it. 2. SQLState: 'HYT00' SQL Server Error: 0 [Microsoft][SQL Server Native Client 10.0]Login timeout expired Additionally, this information may help. 1. Windows firewall is turned off. 2. In SQL Server Configuration Manager > SQL Server Network Configuration > Protocols for SQLEXPRESS, Shared Memory, Named Pipes and TCP/IP are all 'Enabled'. The order is Shared Memory (1), Named Pipes (2) and TCP/IP (3). 3. In SQL Server Configuration Manager > SQL Native Client 10.0 Configuration > Client Protocols, the above three are also 'Enabled'. The order is Shared Memory (1), Named Pipes (2) and TCP/IP (3). Double-clicking TCP/IP tells me that the default port is 1433. 4. Running "netstat -ano", I see no entries for [myIPaddress]:1433.

Failed to generate a user instance of SQL Server due to failure in retrieving the user's local appl

Hi,I spend two days looking for an anwser to this problem but no luck. I have a simple ASP.NET 2.0 application which run correctly on my local machine. But After uploading all files including web.config file on a Windows 2003 Server with SQLEXPRESS installed. I have this error. Please Help!!!!!! Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend