Solved

Unable to insert data into SQL 2008 Table when running "Execute Stored Procedure" from SSMS

Posted on 2009-04-13
1
238 Views
Last Modified: 2012-05-06
These are the values I enter into the following columns on a Table named Main.
Workstation = COOLWD,
Username = Domain\Username,
Domain = Top.Middle.com,
WakeUpType = 6,
MacAddress = 00:c1:4a:f5:66:8c,
WkstnStatus = Ok
So, I go to Stored Procedures in SSMS 2008, right-click on the stored Procedure named "usp_InsertToPCDATA" and select "Execute Stored Procedure". When I do that I get the following error --> Msg 102, Level 15, State 1, Line 9
Incorrect syntax near ':'."
So, it doesn't like the semi-colon. Do I need to set a different "MacAddress" to a different datatype and if so, what? Eventually this data will be updated by a C# Console app.
Thanks Experts,
Wally
USE [PCDATA]

GO
 

DECLARE	@return_value int
 

EXEC	@return_value = [dbo].[usp_InsertToPCDATA]

		@WorkstationName = N'COOLWD',

		@UserName = N'Domain\Username',

		@Domain = N'Top.Middle.com',

		@WakeUpType = 6,

		@MacAddress = 00:c1:4a:f5:66:8c,

		@WkstnStatus = N'Ok'
 

SELECT	'Return Value' = @return_value
 

GO

Open in new window

0
Comment
Question by:wally_davis
1 Comment
 
LVL 57

Accepted Solution

by:
Raja Jegan R earned 500 total points
ID: 24133804
Yes, you have to give : values which are Varchar / Char inside a single quotes.
Try this one out:

EXEC    @return_value = [dbo].[usp_InsertToPCDATA]
                @WorkstationName = N'COOLWD',
                @UserName = N'Domain\Username',
                @Domain = N'Top.Middle.com',
                @WakeUpType = 6,
                @MacAddress = '00:c1:4a:f5:66:8c',
                @WkstnStatus = N'Ok'
 
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Long way back, we had to take help from third party tools in order to encrypt and decrypt data.  Gradually Microsoft understood the need for this feature and started to implement it by building functionality into SQL Server. Finally, with SQL 2008, …
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

948 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now