-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Mapping varchar2 (Oracle 10g) to string field
PostPosted: Fri Mar 30, 2007 11:50 am 
Newbie

Joined: Thu Mar 15, 2007 10:34 am
Posts: 8
How to map a varchar2 column in Oracle 10g to a boolean field in C# Object.

Need this to work in both the cases - Data Retrieval and Updates.

Scenario:

Fetch all employees from tbl_employees

tbl_employees

Column Name Type
Id - Number
EmpName Varchar2
IsActive Varchar2(1) (Y / N)

Employee Object

public bool IsActive{
get { return isActive; }
set { isActive = value; }
}


Data Retrieval - Expecting true in IsActive if the database column has a value of 'Y' and vice-versa

Update - Expecting database column to be updated with 'Y' when IsActive has a value of true, vice- versa.


Thanks for all the help

_________________
Rama Katta


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.