Click here to Skip to main content
15,887,596 members
Home / Discussions / Database
   

Database

 
GeneralRe: Is having an error handler in every single stored procedure excessive? Pin
Ashfield26-Nov-08 8:42
Ashfield26-Nov-08 8:42 
GeneralRe: Is having an error handler in every single stored procedure excessive? Pin
emunews26-Nov-08 9:11
emunews26-Nov-08 9:11 
AnswerRe: Is having an error handler in every single stored procedure excessive? Pin
emunews1-Dec-08 8:12
emunews1-Dec-08 8:12 
GeneralRe: Is having an error handler in every single stored procedure excessive? Pin
Wendelius1-Dec-08 10:40
mentorWendelius1-Dec-08 10:40 
GeneralRe: Is having an error handler in every single stored procedure excessive? Pin
emunews2-Dec-08 3:59
emunews2-Dec-08 3:59 
GeneralRe: Is having an error handler in every single stored procedure excessive? Pin
Wendelius2-Dec-08 4:08
mentorWendelius2-Dec-08 4:08 
AnswerRe: Is having an error handler in every single stored procedure excessive? Pin
emunews20-Jan-09 5:40
emunews20-Jan-09 5:40 
QuestionRead Output parameter with ExecuteReader in DAAB Pin
Meysam Mahfouzi24-Nov-08 22:57
Meysam Mahfouzi24-Nov-08 22:57 
I'm using DAAB (Enterprise Library) for accessing database. My problem is I can't read output parameters when using DataReader. That is I can only read stored procedure's output parameter only when I use ExecuteNonQuery or ExecuteScalar functions. When I use ExecuteReader function, the output parameter is 0. Do you know how I can read output parameter when using ExecuteReader function?

here is a sample code:

var db = new SqlDatabase(ConnectionString);
string sqlCommand = "ReadItems";
DbCommand dbCommand = db.GetStoredProcCommand(sqlCommand);
db.AddInParameter(dbCommand, "@Count", SqlDbType.Int, count);
db.AddOutParameter(dbCommand, "@Total", SqlDbType.Int, sizeof(Int32));
var reader = db.ExecuteReader(dbCommand);
while (reader.Read())
{
     // read items
}
int total = Convert.ToInt32(dbCommand.Parameters["@Total"].Value);  // total is 0

AnswerRe: Read Output parameter with ExecuteReader in DAAB Pin
Ashfield25-Nov-08 0:50
Ashfield25-Nov-08 0:50 
QuestionDoes anyone know if it is possible to supply multiple queries and tables to exp - so that the result is a single export file ? Pin
by824-Nov-08 20:14
by824-Nov-08 20:14 
AnswerRe: Does anyone know if it is possible to supply multiple queries and tables to exp - so that the result is a single export file ? Pin
Wendelius27-Nov-08 4:09
mentorWendelius27-Nov-08 4:09 
QuestionBroken replication Pin
thaarM24-Nov-08 18:46
thaarM24-Nov-08 18:46 
Questionthanks Pin
Abhilash124-Nov-08 17:54
Abhilash124-Nov-08 17:54 
Questionhow to import excel sheet data to postgresql database Pin
Ranjt kumar24-Nov-08 8:56
Ranjt kumar24-Nov-08 8:56 
AnswerCross-post Pin
Wendelius24-Nov-08 9:26
mentorWendelius24-Nov-08 9:26 
QuestionAutogenerated / Numeric Primary Key Pin
CH SRINIW8Z24-Nov-08 4:39
CH SRINIW8Z24-Nov-08 4:39 
AnswerRe: Autogenerated / Numeric Primary Key Pin
Wendelius24-Nov-08 5:17
mentorWendelius24-Nov-08 5:17 
AnswerRe: Autogenerated / Numeric Primary Key Pin
Ashfield24-Nov-08 5:18
Ashfield24-Nov-08 5:18 
GeneralRe: Autogenerated / Numeric Primary Key Pin
Ben Fair25-Nov-08 4:01
Ben Fair25-Nov-08 4:01 
GeneralRe: Autogenerated / Numeric Primary Key Pin
Ashfield25-Nov-08 9:21
Ashfield25-Nov-08 9:21 
QuestionHow to Solve Dead Lock problem in Sql Server 2005 Question Pin
pdnet24-Nov-08 1:37
pdnet24-Nov-08 1:37 
AnswerRe: How to Solve Dead Lock problem in Sql Server 2005 Question Pin
Wendelius24-Nov-08 2:01
mentorWendelius24-Nov-08 2:01 
GeneralRe: How to Solve Dead Lock problem in Sql Server 2005 Question Pin
CH SRINIW8Z24-Nov-08 4:48
CH SRINIW8Z24-Nov-08 4:48 
GeneralRe: How to Solve Dead Lock problem in Sql Server 2005 Question Pin
Wendelius24-Nov-08 5:28
mentorWendelius24-Nov-08 5:28 
GeneralRe: How to Solve Dead Lock problem in Sql Server 2005 Question Pin
Jon_Boy24-Nov-08 8:44
Jon_Boy24-Nov-08 8:44 

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.