Click here to Skip to main content
15,920,836 members
Home / Discussions / C#
   

C#

 
AnswerRe: Getting CMYK colors from bmp Pin
Niklas Ulvinge31-Aug-05 8:10
Niklas Ulvinge31-Aug-05 8:10 
GeneralRe: Getting CMYK colors from bmp Pin
Dario Solera31-Aug-05 8:54
Dario Solera31-Aug-05 8:54 
GeneralRe: Getting CMYK colors from bmp Pin
Niklas Ulvinge31-Aug-05 8:57
Niklas Ulvinge31-Aug-05 8:57 
GeneralRe: Getting CMYK colors from bmp Pin
Dario Solera31-Aug-05 9:29
Dario Solera31-Aug-05 9:29 
GeneralRe: Getting CMYK colors from bmp Pin
Niklas Ulvinge31-Aug-05 9:33
Niklas Ulvinge31-Aug-05 9:33 
GeneralRe: Getting CMYK colors from bmp Pin
Dario Solera31-Aug-05 9:41
Dario Solera31-Aug-05 9:41 
AnswerRe: Getting CMYK colors from bmp Pin
Andrew Kirillov31-Aug-05 9:01
Andrew Kirillov31-Aug-05 9:01 
QuestionEnterprise Library Data Block - ExecuteNonQuery method with rows affected as return value Pin
Member 106086631-Aug-05 4:14
Member 106086631-Aug-05 4:14 
I am using Data Application Block of June 2005 version of enterprise library. I am able to use the executeNonQuery method which is given in the quick starts.
string sqlCommand = "USP_U_ChangeUserPassword";
Database db = DatabaseFactory.CreateDatabase();
DBCommandWrapper commandWrapper = db.GetStoredProcCommandWrapper(sqlCommand);
commandWrapper.AddInParameter("@password", DbType.String, password);
db.ExecuteNonQuery(commandWrapper)

But this way we will not get the number of affected rows.

I tried to use the overloaded ExecuteNonQuery() which returns affected rows
eg,
string sqlCommand = "spChangeName";
Database db = DatabaseFactory.CreateDatabase();

SqlParameter[] arParams = new SqlParameter[2];
SqlParameter param1 = new SqlParameter("@FName", DbType.String);
param1.Value = "Johnson22";
arParams[0] = param1;
SqlParameter param2 = new SqlParameter("@LName", DbType.String);
param2.Value = "White";
arParams[1] = param2;
int affectedRows = db.ExecuteNonQuery("spChangeName", arParams);

But this is throwing the following error
Failed to convert parameter value from a SqlParameter to a string.

Please provide me a solution for this issue

GeneralRe: Enterprise Library Data Block - ExecuteNonQuery method with rows affected as return value Pin
Susan Hernandez31-Aug-05 14:19
Susan Hernandez31-Aug-05 14:19 
AnswerRe: Enterprise Library Data Block - ExecuteNonQuery method with rows affected as return value Pin
Susan Hernandez31-Aug-05 14:28
Susan Hernandez31-Aug-05 14:28 
GeneralRe: Enterprise Library Data Block - ExecuteNonQuery method with rows affected as return value Pin
Member 106086631-Aug-05 17:53
Member 106086631-Aug-05 17:53 
AnswerRe: Enterprise Library Data Block - ExecuteNonQuery method with rows affected as return value Pin
Susan Hernandez1-Sep-05 7:50
Susan Hernandez1-Sep-05 7:50 
QuestionUsing c++ dll in c# Pin
JuanAlbertoMD31-Aug-05 4:02
JuanAlbertoMD31-Aug-05 4:02 
AnswerRe: Using c++ dll in c# Pin
Mohamad Al Husseiny31-Aug-05 4:50
Mohamad Al Husseiny31-Aug-05 4:50 
QuestionC# Project Integration Pin
Jim Barber31-Aug-05 3:35
Jim Barber31-Aug-05 3:35 
AnswerRe: C# Project Integration Pin
Judah Gabriel Himango31-Aug-05 6:29
sponsorJudah Gabriel Himango31-Aug-05 6:29 
AnswerRe: C# Project Integration Pin
Lars Niedziolka31-Aug-05 14:26
Lars Niedziolka31-Aug-05 14:26 
QuestionHow Can I Add and ... Pin
mostafa_h31-Aug-05 3:06
mostafa_h31-Aug-05 3:06 
AnswerRe: How Can I Add and ... Pin
Mohamad Al Husseiny31-Aug-05 5:03
Mohamad Al Husseiny31-Aug-05 5:03 
QuestionCan anyone explain this Pin
totig31-Aug-05 2:48
totig31-Aug-05 2:48 
AnswerRe: Can anyone explain this Pin
benjymous31-Aug-05 4:23
benjymous31-Aug-05 4:23 
Questionhow can I interpret this? Pin
Alex Cutovoi31-Aug-05 2:02
Alex Cutovoi31-Aug-05 2:02 
AnswerRe: how can I interpret this? Pin
enjoycrack31-Aug-05 2:17
enjoycrack31-Aug-05 2:17 
AnswerRe: how can I interpret this? Pin
Anonymous31-Aug-05 2:17
Anonymous31-Aug-05 2:17 
GeneralRe: how can I interpret this? Pin
Alex Cutovoi31-Aug-05 2:32
Alex Cutovoi31-Aug-05 2:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.