Click here to Skip to main content
15,909,651 members
Home / Discussions / Database
   

Database

 
QuestionPerformance problem when closing the SqlDataReader Pin
CADMIN12-Mar-06 21:20
professionalCADMIN12-Mar-06 21:20 
AnswerRe: Performance problem when closing the SqlDataReader Pin
cbhkenshin12-Mar-06 22:30
cbhkenshin12-Mar-06 22:30 
GeneralRe: Performance problem when closing the SqlDataReader Pin
CADMIN13-Mar-06 0:56
professionalCADMIN13-Mar-06 0:56 
AnswerRe: Performance problem when closing the SqlDataReader Pin
Mike Dimmick13-Mar-06 1:27
Mike Dimmick13-Mar-06 1:27 
GeneralRe: Performance problem when closing the SqlDataReader Pin
CADMIN13-Mar-06 3:06
professionalCADMIN13-Mar-06 3:06 
QuestionReading binary data Pin
NewbieDude12-Mar-06 19:06
NewbieDude12-Mar-06 19:06 
QuestionHow to execute a complex query in ado? Pin
sting_lee12-Mar-06 16:54
sting_lee12-Mar-06 16:54 
QuestionBinding Controls Problem Pin
nata200612-Mar-06 5:28
nata200612-Mar-06 5:28 
Hi All!
My Dilema is as follows : I'm developing a WinForms application as front end (GUI) and an MS Access database as back end. In the middle there are a bounch of calsses (Middle Tier) that do data accessing (through the use of ADO.NET), input validations, Calculations (It's a tax calculating application) and so forth.
These classes expose data fields as properties (for instance, the "Firm" class exposes a "AnnualIncome" property which simply returns the "AnnualIncome" field of the current DataRow of the "tblFirms" Datatable).
What I want to do is bind this property to the "txtAnnualIncome" TextBox on the "frmFirm" form.
Suppose the property is declared as follows :
Public int Property AnnualIncome ()
  get
  {
    return tblFirms.AnnualIncome;
  }

The problem is that if the content of tblFirms.AnnualIncome is null an exception is raised. I can avoid the exception by using a try-catch block but then I get a 0 (zero) in the TextBox. I would prefer a blank TextBox for a null valued field.
I can also use an un-typed property that returns an object reference but I prefer not to (if there's an alternative).
Any sugestions anyone?Confused | :confused:
Thanks very much.

Walk the way. Top down.

nata2005.
AnswerRe: Binding Controls Problem Pin
cbhkenshin12-Mar-06 22:25
cbhkenshin12-Mar-06 22:25 
GeneralRe: Binding Controls Problem Pin
nata200612-Mar-06 22:46
nata200612-Mar-06 22:46 
Questionselect command.. Pin
dansoft10-Mar-06 22:33
dansoft10-Mar-06 22:33 
AnswerRe: select command.. Pin
Mike Dimmick11-Mar-06 23:59
Mike Dimmick11-Mar-06 23:59 
AnswerRe: select command.. Pin
albCode12-Mar-06 6:26
albCode12-Mar-06 6:26 
AnswerRe: select command.. Pin
turbochimp12-Mar-06 19:57
turbochimp12-Mar-06 19:57 
QuestionForeign Key Pin
Waldermort10-Mar-06 21:30
Waldermort10-Mar-06 21:30 
AnswerRe: Foreign Key Pin
Mike Dimmick12-Mar-06 0:32
Mike Dimmick12-Mar-06 0:32 
AnswerRe: Foreign Key Pin
HimaBindu Vejella13-Mar-06 18:40
HimaBindu Vejella13-Mar-06 18:40 
QuestionT-SQL Help Pin
WDI10-Mar-06 20:16
WDI10-Mar-06 20:16 
AnswerRe: T-SQL Help Pin
Dave Kreskowiak11-Mar-06 17:45
mveDave Kreskowiak11-Mar-06 17:45 
QuestionADO.NET transactions affect performance? Pin
Judah Gabriel Himango10-Mar-06 6:29
sponsorJudah Gabriel Himango10-Mar-06 6:29 
AnswerRe: Transactions affect performance? Pin
Jörgen Sigvardsson10-Mar-06 10:00
Jörgen Sigvardsson10-Mar-06 10:00 
GeneralRe: Transactions affect performance? Pin
Judah Gabriel Himango10-Mar-06 10:34
sponsorJudah Gabriel Himango10-Mar-06 10:34 
GeneralRe: Transactions affect performance? Pin
Jörgen Sigvardsson10-Mar-06 10:52
Jörgen Sigvardsson10-Mar-06 10:52 
AnswerRe: Transactions affect performance? Pin
Jörgen Sigvardsson10-Mar-06 10:04
Jörgen Sigvardsson10-Mar-06 10:04 
GeneralRe: Transactions affect performance? Pin
Judah Gabriel Himango10-Mar-06 10:29
sponsorJudah Gabriel Himango10-Mar-06 10:29 

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.