Viewing 15 posts - 1 through 15 (of 36 total)
Thanks to all who tried to help.
I figured it out. I didn't mention that I was working in a Dynamics CRM environment (because I didn't think it mattered) but it...
September 26, 2013 at 9:11 am
michal.lisinski (9/24/2013)
Hi LadyReaderCould you try to do another experiment and set as hardcoded:
//SqlCommand sqlCommand = new SqlCommand(sSprocName, Con);
SqlCommand sqlCommand = new SqlCommand("exec dbo.GetBySubjectId @SubjectIdString", Con);
Br.
Mike
Mike, thanks for the suggestion. I...
September 25, 2013 at 7:25 am
RBarryYoung (9/24/2013)
September 24, 2013 at 3:18 pm
Okay then, that's great. How are you defining your C# parm?
AndrewSQLDBA (9/24/2013)
SELECT
GroupId
, GroupName
, FileTypeName
, SubjectID
FROM
dbo.MyTable
WHERE
SubjectId =...
September 24, 2013 at 3:13 pm
Yes, that query returns 1 row.
September 24, 2013 at 3:11 pm
Yes, to all questions.
The field I am comparing the parameter to is defined as uniqueidentifier and contains a Guid.
The sproc now reads, in part:
where filetypename = 'Enrollment' and
SubjectId =...
September 24, 2013 at 3:10 pm
Yes, to all questions. No rows returned.
Here is what the sproc looks like now:
ALTER procedure [dbo].[ce_GetBySubjectId]
(@SubjectIdString nvarchar(550))
as
begin
set nocount on
Select GroupId, GroupName from dbo.MyTable
where filetypename = 'Enrollment' and...
September 24, 2013 at 11:49 am
Andrew, the method was originally written to handle two stored procedures. The method works for the other sproc. The connectionstring is fine.
You do not need to Open...
September 24, 2013 at 9:50 am
Thanks for responding, Mike. Yes, the original method call passes in the name of the stored procedure and the value of the parameter.
private DataSet dsList(String connectionString, String sSprocName, String...
September 24, 2013 at 8:53 am
Thanks for responding, Andrew. I just forgot to copy the "End".
No, I am not allowing null input and the null reference was not originally there. I added it during my...
September 24, 2013 at 8:28 am
The rest of the code is:
DataSet ds = new DataSet();
try
...
September 24, 2013 at 8:26 am
This was a good demo and it taught me something I didn't know. Minor error: your end point for the code for the digits is incorrect:
"Ascii Codes 48 thru...
December 1, 2010 at 6:56 am
I am female and have been programming/developing/analyzing systems since the mid-1970's. I won my current position by being selected by a male manager from among a large group of interviewees,...
January 6, 2010 at 6:23 am
For my purposes, all params will be strings.
October 10, 2009 at 10:23 am
Gosta, thank you for your comments.
I will try Stephen's solution with your variation as soon as I can. I'm in the middle of something else right now, but first thing...
October 9, 2009 at 2:04 pm
Viewing 15 posts - 1 through 15 (of 36 total)