Is asp.net database design different to ado and access?

K

kiwileiro

Hi, i am using asp.net 2.0 to make a database front end. I would like opinions on which field of a lookup table to store in the main table.

Currently I store the keyfield value from a dropdownlist that is retrieving data from another table, in to my main table.

I have had difficulties when trying to display the data in the itemtemplate of a gridview.

There appears to be no easy way to show the RELATED TABLE information without linking the tables in the query to retrieve it.

Doing this though makes it harder to update the table adapter in Edit or Insert mode. I would rather use the adapters as Visual Studio made them for me.

A helpful person in a forum has suggested that instead of storing the keyfield in the table that I store the actual text value, and that would make it a lot easier as I have just to display the value and not link to it.

I have made many Access and winform databases but this is my first asp.net one.

In an Access or winforms database I would bind the keyfield and save that in to the main table. As asp doesnt have the continuous state connected to the database, I wonder if we design differently too.

What are your thoughts on this? What is a preferred approach to a very common issue?
 
C

Cowboy \(Gregory A. Beamer\)

I assume you mean you have dragged tables onto a DataSet? Cool. You now have
Table Adapters. Add the Relationship. You can now bind like you desire. As
for INSERT and update, run the table adapters in the order they need to be
inserted into the database (parente first, child last).

What generally causes problems with relationships is improper ordering of
saving items. If you have automagic stuff, you will have to take control and
force them to save (and pull out of the database, for that matter) in the
proper order.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside the box!
*************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top