Script To Lock Down A Regular User?

Jul 23, 2005

I don't like the fact that any user I create has access to system tables in
the Master databases and the ability to issue 'sp_who' plus God knows what
other system stored procs.

Is there a white paper or a script to lock down a user so that they do not
have this broad access without breaking their regular ability to run their
own queries against their own databases? I would like them to be a regular
user without the ability to snoop around in my SQL Server.

--
John Dalberg

View 3 Replies


ADVERTISEMENT

How To Give Permissions To A Regular Domain User To Manage SQL Server Database Service?

Jan 22, 2008

After SQL Server 2005 Database Engine is installed by domain administrator, how to give permissions to a regular domain user so that user can control SQL Server Database service?

View 3 Replies View Related

SQL 2012 :: Export Dead Lock Info To User?

Dec 10, 2014

How to export the dead lock information to the user ?

View 2 Replies View Related

SQL Server 2014 :: Can Lock A Table Only For A Specific User For Some Seconds

Apr 8, 2015

I need to do some operations on a table when any user dont work with it.How do i do it?

Do i lock the table? and is it possible?(I dont want to deny permission from a user because cause error)

Can i do it with a open transaction ?

View 4 Replies View Related

SQL Server Admin 2014 :: Can Lock Table Only For Specific User For Some Seconds

Apr 8, 2015

I need to do some operations on a table when any user dont work with it.How do i do it?Do i lock the table? and is it possible?

View 8 Replies View Related

Error: A Deadlock Was Detected While Trying To Lock Variable X For Read Access. A Lock Could Not Be Acquired After 16 Attempts

Feb 2, 2007

I simply made my script task (or any other task) fail

In my package error handler i have a Exec SQL task - for Stored Proc

SP statement is set in following expression (works fine in design time):

"EXEC [dbo].[us_sp_Insert_STG_FEED_EVENT_LOG] @FEED_ID= " + (DT_WSTR,10) @[User::FEED_ID] + ", @FEED_EVENT_LOG_TYPE_ID = 3, @STARTED_ON = '"+(DT_WSTR,30)@[System::StartTime] +"', @ENDED_ON = NULL, @message = 'Package failed. ErrorCode: "+(DT_WSTR,10)@[System::ErrorCode]+" ErrorMsg: "+@[System::ErrorDescription]+"', @FILES_PROCESSED = '" + @[User::t_ProcessedFiles] + "', @PKG_EXECUTION_ID = '" + @[System::ExecutionInstanceGUID] + "'"

From progress:

Error: The Script returned a failure result.
Task SCR REIL Data failed

OnError - Task SQL Insert Error Msg
Error: A deadlock was detected while trying to lock variable "System::ErrorCode, System::ErrorDescription, System::ExecutionInstanceGUID, System::StartTime, User::FEED_ID, User::t_ProcessedFiles" for read access. A lock could not be acquired after 16 attempts and timed out.
Error: The expression ""EXEC [dbo].[us_sp_Insert_STG_FEED_EVENT_LOG] @FEED_ID= " + (DT_WSTR,10) @[User::FEED_ID] + ", @FEED_EVENT_LOG_TYPE_ID = 3, @STARTED_ON = '"+(DT_WSTR,30)@[System::StartTime] +"', @ENDED_ON = NULL, @message = 'Package failed. ErrorCode: "+(DT_WSTR,10)@[System::ErrorCode]+" ErrorMsg: "+@[System::ErrorDescription]+"', @FILES_PROCESSED = '" + @[User::t_ProcessedFiles] + "', @PKG_EXECUTION_ID = '" + @[System::ExecutionInstanceGUID] + "'"" on property "SqlStatementSource" cannot be evaluated. Modify the expression to be valid.

Warning: The Execution method succeeded, but the number of errors raised (4) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.

And how did I get 4 errors? - I only set my script task result to failure

View 11 Replies View Related

Row Lock Versus Page Lock In SQL 2000.

Apr 7, 2004

Hi
We are facing an acute situation in our web-application. Technology is ASP.NEt/VB.NET, SQL Server 2000.

Consider a scenario in which User 1 is clicking on a button which calls a SQL stored procedure. This procedure selects Group A of records of Database Page1.

At the same time if User 2 also clicks the same button which calls same SQL stored procedure. This procedure selects Group B of records of Database Page1.

So, its the same Page1 but different sets of records. At this moment, both the calls have shared locked on the Page1 inside the procedure.

Now, in call 1, inside the procedure after selecting Group A of records, the next statement is and update to those records. As soon as update statement executes, SQL Server throws a deadlock exception as follows :

Transaction (Process ID 78) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction

We are able to understand why its happening. Its because, Group A and Group B of records are on the same Page1. But both the users have shared lock on the Page1. So, no one gets the exclusive lock in records for update, even though, the records are different.

How can I resolve this issue? How can I get lock on wanted rows instead of entire page?

Please advice. Thanks a bunch.

Pankaj

View 1 Replies View Related

ERROR: A Variable May Only Be Added Once To Either The Read Lock List Or The Write Lock List.

May 22, 2006

Hi,
I have set of 2 DTS packages, one of which calls the other by forming a command-line (dtexec) using a Execute Process task.

From the parent package-> Execute Process Task->
dtsexec /F etc... /<pkg variable> = "servername"

Each of the parent and the called package have a variable: "User::DWServerSQLInstance" which is mapped to the SQL server connection manager server name property using an expression. The outer package has the above variable and so does the inner called package (which gets assigned through the command line from the outerpackage call to inner)

I "sometimes" get the following error:

OnError,I4,TESTDOMAdministrator,ACDWAggregation,{A1F8E43F-15F1-4685-8C18-6866AB31E62B},{77B2F3C7-6756-46EB-8C01-D880598FB4B3},5/22/2006 5:10:28 PM,5/22/2006 5:10:28 PM,-1073659822,0x,The variable "User::DWServerSQLInstance" is already on the read list. A variable may only be added once to either the read lock list or the write lock list.

Help would be appreciated!

I have seen other posts on this but, not able to relate the solution to my scenario.

View 9 Replies View Related

A Variable May Only Be Added Once To Either The Read Lock List Or The Write Lock List

May 10, 2006

Hi All,



I have seen a few other people have this error.

Package works fine when run from BIDS, DTExec, dtexecui. When I schedule it, It get these random errors. (See below)

The main culprit is a variable called "RecordsetFileDIR" which is set using an expression. (@[User::_ROOT] + "RecordSets\")

A number of other variables use this as part of their expression and as they all fail, pretty much everything dies.

I have installed SP1 (Not Beta) on server. Package uses config files to set the value of _ROOT.



The error does not always seem to be with this particular variable though. Always a variable that uses an expression but errors are random. Also, It will run 3 out of 10 times without a problem. I am the only person on the server at the time.

Any ideas?



Cheers,

Crispin



Error log:

OnError,,,POSBasketImport,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1073659822,0x,The variable "User::RecordsetFileDIR" is already on the read list. A variable may only be added once to either the read lock list or the write lock list.

OnError,,,POSBasketImport,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1073639420,0x,The expression for variable "rsHeaderFile" failed evaluation. There was an error in the expression.

OnError,,,DF_Header_Header,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1071636247,0x,Accessing variable "User::rsHeaderFile" failed with error code 0xC00470EA.

OnError,,,Move All Data,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1071636247,0x,Accessing variable "User::rsHeaderFile" failed with error code 0xC00470EA.

OnError,,,Load Open Batches and Process Files,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1071636247,0x,Accessing variable "User::rsHeaderFile" failed with error code 0xC00470EA.

OnError,,,POSBasketImport,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1071636247,0x,Accessing variable "User::rsHeaderFile" failed with error code 0xC00470EA.

OnError,,,DF_Header_Header,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1071636390,0x,The file name is not properly specified. Supply the path and name to the raw file either directly in the FileName property or by specifying a variable in the FileNameVariable property.

OnError,,,Move All Data,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1071636390,0x,The file name is not properly specified. Supply the path and name to the raw file either directly in the FileName property or by specifying a variable in the FileNameVariable property.

OnError,,,Load Open Batches and Process Files,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1071636390,0x,The file name is not properly specified. Supply the path and name to the raw file either directly in the FileName property or by specifying a variable in the FileNameVariable property.

OnError,,,POSBasketImport,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1071636390,0x,The file name is not properly specified. Supply the path and name to the raw file either directly in the FileName property or by specifying a variable in the FileNameVariable property.

OnError,,,DF_Header_Header,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1073450901,0x,"component "rsHeader" (365)" failed validation and returned validation status "VS_ISBROKEN".

OnError,,,Move All Data,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1073450901,0x,"component "rsHeader" (365)" failed validation and returned validation status "VS_ISBROKEN".

OnError,,,Load Open Batches and Process Files,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1073450901,0x,"component "rsHeader" (365)" failed validation and returned validation status "VS_ISBROKEN".

OnError,,,POSBasketImport,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1073450901,0x,"component "rsHeader" (365)" failed validation and returned validation status "VS_ISBROKEN".

View 1 Replies View Related

How To Lock A Table So Others Cannot Lock It

May 23, 2001

Hi,

I want to lock a table so others cannot lock it but able to read it inside transactions.

The coding I need is something like this: set implicit_transactions on begin transaction select * from table1 with (tablock, holdlock) update table2 set field1 = 'test' commit transaction commit transaction

I have tried the coding above, it won't prevent others from locking table1.

So, I changed the tablock to tablockx to prevent others from locking table1. But this will also prevent others from reading table1. So, how can I lock table1 so others cannot lock it but still able to read it?

Thank you for any help

View 1 Replies View Related

Regular Expression

Jan 10, 2007

Hi Guys

I have a table in which one of the column name is "NAME".
I have to write query in which column is not null and if there is something then check for 'trust' or 'trustee' in the string. and if found don't pull that record. skip it

who do i do these. Any help please.

View 2 Replies View Related

Regular Expression?

Mar 25, 2008

HiI'm looking to return rows from a table where a column is LIKE a keyword. This is my current code:SELECT DISTINCT business_name FROM Table WHERE business_name LIKE @keyword + '%' ORDER BY business_name ASCThe problem with this is that if a business is called "The White Ship Inn", and the keyword to match is "White Ship" it will not match. If i put another wild card in front of @keyword then this finds too many matches - i need it to match against columns which either start with the keyword, or have a whitespace in front of them. Is there some kind of T-Sql i can use or will i have to go down the regex route (using this (http://www.codeproject.com/KB/mcpp/xpregex.aspx)) ?cheers

View 2 Replies View Related

Regular Expression..

May 6, 2004

Does SqlServer support Regular expression?
I want to know if it's avilable or not...
And if it's not available, I want to know any other efficient way to validate string.. manipulating Regular expression style validation.

Thank you all...

View 6 Replies View Related

MS SQL:- Regular Expressions

Jun 24, 2008

Hi, the Microsoft SQL Server version is 2000


Basically I want use a basic regular expression but can't seem to get the syntax right.

i want to compare ID_short = ID_Long

ID_short is a truncated version of ID_Long, and I want to search on the beginning only (hence I can't use the 'LIKE' comparative on it's own).

What is the syntax to use Reg Expressions (or if anyone knows a non RegExp way of searching the beginning please let me know).



Thanks

View 5 Replies View Related

Regular Expression?

Sep 6, 2005

I need to remove all the [ and ] in every sql stmt where they are usedto close encircling numeric value, fyi, all these sql stmt areconverted from an Access db. For instance,select *from XYZtblwhere fieldA = [1] or fieldA = [2] or fieldA = [3]to beselect *from XYZtblwhere fieldA = 1 or fieldA = 2 or fieldA = 3-- and of course I'd have written in as follows, but that's not-- the pointselect *from XYZtblwhere fieldA IN (1,2,3)Thanks.

View 5 Replies View Related

Regular SQL 6.5 Vs. Enterprise Edition

Mar 23, 1999

A developer I need to support believes that the Enterprise Edition is required to take advantage of a dual processor Compaq ProLiant 3000. This machine is not a quad box, just a standard MPS architecture with a single CPU installed.

I recall that the standard SQL 6.5 build will fully utilize a standard MPS DP system and that Enterprise is required only for 4-way, 8-way and n-way boxes such as the Tandems.

Any thoughts?

- Clark

View 3 Replies View Related

Regular Expression For Whole Words

Feb 8, 2006

I am try to build a query which only matches whole words and so far I've got this.


Code:

SELECT *
FROM tblSearchWords
WHERE CorrectSpelling LIKE '%[^a-zA-Z0-9]blah[^a-zA-Z0-9]%'



This will return rows which contain the string 'blah' without any numeric or alphanumeric characters beside it. However it doesn't return the rows where 'blah' is either at the start or end of the string as it expects any character except a-zA-Z0-0.

Is there any way to accept string when there is nothing on either side as well?

Thanks,
Goran

View 1 Replies View Related

SSIS And Regular Expressions

Feb 9, 2007

Hi,

I have a crappy old database that has an email field with a lot of bad data, and I need to use SSIS to extract a list of names & email addresses.

I have an OLE DB Source set up to pull the relevant columns out of the database. Is there a way that I could setup a Regular Expression based filter to disregard any rows where my email Regex does not match the value of the email column?

Thanks,
John

View 4 Replies View Related

SELECT And Regular Expression

Apr 24, 2006

Hi,I'm not a big friend of MSSQL, but I have to do one query I've done formySQL.But I don't know how...I have to select 'user' from 'db' where first letter is E or N, second is Bor 0 and after that there are 6 or 7 digits I know.How can I do that?In mySQL it would be something like:SELECT * FROM `table` WHERE `account` regexp '^[EN][B0]123456$' ORDER BY`Id`;Thanks in advance,Martin

View 10 Replies View Related

Regular Expression Issue

Nov 8, 2006

I am trying to exclude all strings that has 'a' inside (I havesimplified the actual problem)select 1where 'bb b a dfg' like '%[^a]%'However, the above does not work. By the way, I can not use 'not like'such as:select 1where 'bb b a dfg' not like '%a%'Although the above will work but the idea is that I have to use 'like'and not 'not like'. This is partly because I have to exclude rows froman exclusion table (a table that has many rows that will be excluded).Actually I want to include all srings that has lets say // in it usinga regular expression. I would like to write it as (I am sure it willnot work):select 1where column like '%[^/][^/]%'That should exclude strings like: 'aaa // aa aa' or 'bb bbb // bb' etcand include strings like: 'aaa aa aa' or 'bb aa nn' etcIs there any way to write a regular expression to do it? Otherrwise Ihave to solve this problem without using regular expressions in theexclusion table.Thanks.

View 1 Replies View Related

How To Use Regular Expressions On SSIS?

Sep 27, 2007

Hi everyone,


Is it possible? I haven't idea how to implement as if it were done from conventional .Net code
I'd like to check every field for a plan file

First field NNNNNNN
Second field XXXNNNNNNN
,,

Thanks for any input or idea,

View 11 Replies View Related

PATINDEX / LIKE - How To Do A Regular Expression In One Of These?

May 8, 2008

Hi

I have a table which stores a big chunk of html text, which I have to search for and replace some strings.
How can I write a query that makes use of regular expressions to do the following:

Below is a block of example text
======================================================================
" src="http://aaaa/bbbb/cccc.nsf/blind%2010x10.gif?OpenImageResource" width=10> <img height=10 alt="" src="http://aaaa/bbbb/cccc.nsf/blind%2010x10.gif?OpenImageResource" width=10><img height=11 alt=""
http://aaaa/bbbb/cccc.nsf/blablablabla?OpenDocument src="http://aaaa/bbbb/cccc.ns http://aaaa/bbbb/cccc.nsf/d8d4f0dfa09ba71142256cc50040ee51/ee9b4493dac727be422571c30027df61? OpenDocument" target=_self>

======================================================================

Now I want to search and replace the string that is highlighted in red with something like "FOUND"
The below string is what I want to search for - I will used PATINDEX on the string below to find the start index of the string in the body, and then I will add on 114 to the when doing a replace:

'%http://aaaa/bbbb/cccc.nsf/%some guid%/%some guid%?OpenDocument%'


For example

REPLACE
(
TheField,
SUBSTRING

(
TheField,
PATINDEX(''%http://aaaa/bbbb/cccc.nsf/%some guid%/%some guid%?OpenDocument%', TheField),
,114

)
,
'FOUND'
)



QUESTION:

what would the regular expression be and how does one type it in the query?
I tried something like the below but it does not work, please advise .....
[a-z][0-9]{32} %/% [a-z][0-9]{32}

View 1 Replies View Related

Regular Expressions In SQL 2005 Using C#

Sep 24, 2006

Hi all,

i wrote a little function that is basically supposed to give me a match of a regular expression in C#. i tested it out in VS05 and it seems to work fine. It hits the fan when i try it on SQL Query analyzer once deployed. Anyone have any idea why?

here is the C# class that I deploy to a db using VS05.

using System;

using System.Data;

using System.Data.SqlClient;

using System.Data.SqlTypes;

using Microsoft.SqlServer.Server;

using System.Text.RegularExpressions;



public partial class RegExTest

{

[Microsoft.SqlServer.Server.SqlFunction(IsDeterministic = true, IsPrecise = true)]

public static string RegExMatch(string pattern, string matchString)

{

Regex r1 = new Regex(pattern);

if (r1.Match(matchString.TrimEnd(null)).Success)

{

Regex testReg = new Regex(pattern);

Match regMatch = testReg.Match(matchString);



string runnumber = regMatch.ToString().TrimEnd('_');

runnumber = runnumber.TrimStart('_');

return runnumber;

}

else

{

return null;

}



}

};

Basically i have a teststring that looks like abc_xxx_nnndef. xxx and nn are both numbers, and im using the pattern _\d{3}_ to test it out in SQL (i need the numbers between '_' and '_'). But it never even proceeds past the if statement in SQL i think. here is the basic SQL that i use to test the above function:

use northwind

go

declare @teststring varchar(50),

@pattern varchar(10),

@out varchar(50)

set @teststring = 'dw_012_34.ext'

set @pattern = '_\d{3}_'

set @out = dbo.RegExMatch(@pattern, @teststring )

select @teststring

select @pattern

select @out



Anyone have any suggestions as to why it works in VS 05 when I use it in a C# program, but fails on the SQL version?

View 8 Replies View Related

SQL Select Statement With Regular Expressions

Apr 27, 2007

HiI have a large table with allot of data in it, Im trying to find the correct SQL statement to select all the records that do not start with a letter or a number.So some records may start with a '~' and a few '$' and even some '?'. So I would like a statement that would select all of these while leaving out any records that start with anything else, such as numbers or letters.And on a similar theme, Im also trying to select all records that start with a number. Ive been using the "select blah from blah where LIKE 'a%'" for each letter and ive tried to have a play and search around that statement....
Today I was told to use a regex within my 'SELECT' statement, but I had never heard of this being done before... so I done a number of searches on Google and although I found references, I didnt actually find any examples. So when I tried to put something together I kept getting errors.
 Ive used regular expressions before so theres no problem writing the expression that I need, however Ive no idea how to implement it into a SELECT statement.
 
If someone could please show me an example of the structure/syntax of an sql select query that contains a regex then I would be most appreciative! :)
 

View 2 Replies View Related

Importing Data On Regular Schedule

Oct 14, 2005

Help needed please from the SQL team,

I need to import data from one table on to another on a regular basis (twice a day). Sorta like...

From:
Server1
Db1
Table1

To:
Server2
Db1
Table1

I used DTS to get the data initially from Server1 but how I can do it on a automated basis?

Thanks.

View 1 Replies View Related

Replace Function And Regular Expressions

Jul 20, 2005

Is it possible to use the REPLACE function in SQL Server 2000 so thatit returns a string containing only alpha-numeric characters (muchlike using regular expressions)?Thank you in advance for any suggestion.Darren.

View 1 Replies View Related

How Can I Use Regular Expressions In WHERE Clause Directly?

Oct 30, 2006

How can I use regular expressions in WHERE clause directly?

select * from mytbl where myfld like '[0-9]*key'

View 3 Replies View Related

Using Regular Expression In Conditional Split?

Jun 29, 2007

I have as csv-file wich I import into an SQL Server table. Now I want to do some checks on it. I use a conditional split to direct data to the other tables (1 table for the correct data, 1 table for the rejected data).



Is it possible to use a regular expression in a case in a conditional split to check if a columns has the right format?

If yes? How do I do that?

If no? What is the alternative?



Thanks!

View 1 Replies View Related

Regular Expressions In SQL Server 2005

Mar 31, 2006

Hi-

Someone posted on a thread that you can use VB (or C#) to write Regular Expressions for SQL Server 2005. I know how to write RegEx in VB, so can someone point me to a reference which explains how to use them in / with SQL2005? Or, can someone explain how?

Thanks,

-David

View 4 Replies View Related

How To Format A Message With Regular Expression

May 2, 2008

Hello everyone
I'm new with Reporting services, so my problem is that i want to show what filter the user enter
exemple :
Data between 12/1/2007 and 4/20/2008

I did all that with this statement :

= "Briefing between "+ Parameters!FromDate.Value+ " and " +Parameters!ToDate.Value

but when i want to dispaly another filter it doesn't show up like this :

= "Briefing between "+ Parameters!FromDate.Value+ " and " +Parameters!ToDate.Value
IIf( Parameters!Company.Value!="",Parameters!Company.Value,"")

I am sorry i have to jump up into Sql reporting service without a good skills on expressions

View 6 Replies View Related

Can I Do Regular Expressions Using TSQL In SQL Server2005?

Apr 20, 2007

I am running PHP with SQL Server 2005. I have [bold] in some of the values in my result set, which needs to be striped out. I had a function in SQL Server2000 that did that, but the same function does not work in SQL Server2005. Any dieas?


CREATE FUNCTION

dbo.fn_regex(@pattern varchar(255), @matchstring varchar(8000))

RETURNS int

AS

BEGIN

declare @obj int

declare @res int

declare @match bit

set @match=0



exec @res=sp_OACreate 'VBScript.RegExp',@obj OUT

IF (@res <> 0) BEGIN

RETURN NULL

END



exec @res=sp_OASetProperty @obj, 'Pattern', @pattern

IF (@res <> 0) BEGIN

RETURN NULL

END



exec @res=sp_OASetProperty @obj, 'IgnoreCase', 1

IF (@res <> 0) BEGIN

RETURN NULL

END



exec @res=sp_OAMethod @obj, 'Test',@match OUT, @matchstring

IF (@res <> 0) BEGIN

RETURN NULL

END



exec @res=sp_OADestroy @obj

return @match

END

GO

View 7 Replies View Related

Want To Run A Stored Procedure At Regular Intervals Automatically

Nov 8, 2006

Hi,
I want to run a stored procedure automatically at regular intervals.The time duration is given by me as input details.for example i will
give the date and i should send email to some recipients just one day before the given date.I want this to be done in sql stored procedures.
 
Can anyone help?
Thanks in advance,
Nithya

View 7 Replies View Related

I Am Getting An Error While Making A Regular Database Command

Dec 28, 2007

hello
here is my code  int a = Convert.ToInt32(Request.QueryString["ProductID"]);
SqlConnection conn = new SqlConnection(ConnectionString);

SqlCommand command4 = new SqlCommand("myStoredProcedure", conn);
command4.CommandType = CommandType.StoredProcedure;

DbParameter param2 = command4.CreateParameter();
param2.ParameterName = "@ProductID";
param2.DbType = DbType.Int32;
param2.Value = a;
command4.Parameters.Add(param2);

param2 = command4.CreateParameter();
param2.Direction = ParameterDirection.Output;
param2.ParameterName = "@UserName";
param2.DbType = DbType.String;
command4.Parameters.Add(param2);

conn.Open();
command4.ExecuteReader();
conn.Close();

Label3.Text = command4.Parameters["@UserName"].Value.ToString();
}Exception Details: System.InvalidOperationException: String[1]: the Size property has an invalid size of 0.Line 48:
Line 49: conn.Open();
Line 50: command4.ExecuteReader();
Line 51: conn.Close();
 and here is my stored procedure ALTER PROCEDURE dbo.myStoredProcedure
--

(@ProductID int,
@UserName varchar(255) OUTPUT)

AS

SET @UserName = (SELECT UserId FROM Products WHERE ProductID = @ProductID)
 what is wrong? i never seen that error and i don't know from where could it came from
please help me,
thanks

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved