Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: Lookup columns: msg#00085

db.firebird.dotnetprovider

Subject: Re: Lookup columns

Hi

I know this is not a direct firebird .net provider related question but I didn't get an answer on the M$ newsgroups so will try here to, sorry. :)

Is there a way to create lookup columns in tables in the typed datasets?

Like

CityTable
----------
CityID
CityName

Employee
--------
EmployeeID
EmployeeName
City -> foreign key to CityTable.CityID
CityName -> lookup column, will get the value from CityTable according the City value


First the CityTable records are loaded and then the Employee. I could do this with SQL but that means I would load the same data 2 times and I'm trying to lower the network usage as the lines that we are using are slow.

In expression column I was trying to use the Parent keyword but with no luck. So is there a way to do this?
well, you can do it by hand, it's pretty fast

employeeTable.BeginLoadData();
foreach (TypedDataSet.EmployeeRow employee in employeeTable.Rows) {
employee.CityName = employee.CityRow.Name;
}
employee.EndLoadData();


you can speed this up further by going throught the dataset designer and skip all the casting
that are along. and if you're going to loads further records (if you batch loads instead of loading full tables), you can put a employeeTable.Select instead of Rows

The other solution is to make many-to-many relation and put another table in-between that way you'll have the children relationships it require (although I am fairly sertain it should work with parent)

the third is to use LinQ (it is on the microsoft lab page, still in beta, designed for C# 3.0, but it allow full blown relational queries)

Thx

Zoltan
HTH
CUIN Kaczy



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
hardware.arm.at...    cms.citadel.dev...    video.gstreamer...    java.facelets.u...    misc.basics.qna...    web.wiki.instik...    network.uip.use...    xdg.devel/2003-...    tex.bibtex.bibd...    finance.quotesp...    ietf.zeroconf/2...    redhat.blinux.g...    suse.db2/2003-0...    php.phpesp/2004...    uml.devel/2003-...    gnome.labyrinth...    qnx.openqnx.dev...    boot-loaders.gr...    db.dataperfect....    audio.audacity....    linux.uclinux.m...    editors.j.devel...    os.openbsd.tech...    kde.users.multi...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation