June 12, 2008 at 10:09 am
Is there a way to create a field like I did on the following image on SQL Server 2000???
In this example... the field Zones depend on the content of the ZONES table... I mean... I'm getting the possible values from a list in other table...
Please send me your suggestions to sipi41@hotmail.com thanks for your help and time!!...
Billy.
June 12, 2008 at 10:44 am
Two answers. Yes, it's possible. What you want is a foreign key to another table to ensure integrity between the data entered on one table and the data entered on another.
No, you can't edit the data in the Management Studio through foriegn key constraints the same way as you do in Access. You would have to create an actual interface using code or buy some third party tool to do this.
So, yes, you can enforce referential integrity, but no you can't do in place edits based on that referential integrity.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
June 12, 2008 at 10:47 am
mmm... LOOOOOOOST!!! 🙁
June 12, 2008 at 11:15 am
SQL Server is not Access.
Access is doing two things there. First it's maintaining referential integrity between two tables. Second, it's providing you with a GUI (graphical user interface) to look at data from table #2 in table #1.
SQL Server can maintain referential integrity between two tables. It's called a foreign key. They work very well. SQL Server, good, bad or otherwise, doesn't provide you with a GUI that does what Access does. You either have to build a tool yourself or you need to buy something from a third party to get that type of behavior.
Is that more clear?
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
June 12, 2008 at 11:28 am
Guillermo -
Like Grant mentioned - SQL Server Management Suite is not to be used as a front-end for end-users doing data entry.
A few options for you:
1. use Access. You can link to SQL Server tables, and set this up just like you have right now.
2. Get a hold of VS2008 and use dynamic data web sites. It will give you rudimentary but useful CRUD interfaces in a matter of minutes, with those tie-ins set up for you. Drop-downs are pretty much automatic on the foreign keys, etc....
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
June 12, 2008 at 11:29 am
Actually, since it looks like you are using Access as a front end to a SQL Server 2000 database, you should be able to do the same thing with Access to a SQL Server 2005 backend. I haven't done any Access to SQL development personally, so can't help out more . I was the one pumping data INTO Access database tables from SQL Server.
😎
June 12, 2008 at 11:38 am
It might be possible in Access. I'm happy to say, I wouldn't know how to go about it at all.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
June 12, 2008 at 12:43 pm
Grant Fritchey (6/12/2008)
It might be possible in Access. I'm happy to say, I wouldn't know how to go about it at all.
Oh - it absolutely is. Setting up drop-downs is fairly straightforward, right in the table design.
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
Viewing 8 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply