As you can see I have been investigating about this issue for a long time (almost a year) and still no answer.
It might seem silly to you the kind of approach in looking for an answer because you might as well think: Why doesn’t this guy simply customize each one of his screens and avoid all problems that he is facing trying to solve this?
The answer is rather silly too: Dynamic Data works based on templates and I am looking to solve this problem globally, for any model that I might have, for any new Dynamic Data application I’d could start developing.
That’s the point: I don’t want customized solutions but a global one.
In this case you can see that even tough there are many ways of getting the values that you have just used in a previous entry in the Insert page,
and not forgetting that Dynamic Data resets everything (specially dropdownlists to [No Set]) after every new insertion.
There are also ways for starting building complex algorithms as to create a matrix capable of containing: values, type of control, column name, primary key name, foreign key names, etc.
The problem is that you have to create a lot of Session variables (or whatever comes to your mind) as to simulate “state” (don’t even know if that could be the proper word) which are of course unnecessary because I know for sure that there must be a way
of getting all of this at once.
In fact, Dynamic Data does it internally as to make proper insertion in the database.
So here goes my question again:
Is there a way of getting the whole set of values/definitions of a previously inserted page as to manipulate them accordingly?
For instance and as to contribute a little bit in the discussion of “Cascading”, there should be a way of retrieving properly the “chain” of “referential integrity” at once for every foreign key column:
So if you had for instance:
Let’s use the following notation: <tablename>.<column>
Let’s also say that Catalogue ahs a column showing a Foreign Key: Catalogue.TypeOf Product_Code
Let’s suppose that the primary key for the table TypeOfProduct is the column TypeOfProduct_Code which is the primary key of that table and also of the type Identity.
Let’s also suppose that the table TypeOf Product also has a foreign key:
TypeOf ProductCode.Company_Code which belongs to the Company table whose primary key is Company_Code.
So I have 3 tables: Catalogue, TypeOf Product and Company.
If I have an Insert page showing a dropdownlist for TypeOf Product_Code while inserting in the Catalogue table there should be a way of getting:
Catalogue.Catalogue_code shown as Primary Key, Int32, Identity, Catalogue.Product_Name shown as String, 60 length, “Tuna Fish” …
Catalogue. Company_Code shown as Foreign Key, Int32, 6543 (e.g.)
SORRY, I FORGOT TO WRITE THE MOST IMPORTANT INFORMATION OF ALL:
FOR EACH ONE OF THE ABOVE IT WOULD BE NEEDED TO HAVE THE NAME OF THE TABLE WHO ORIGINATED THE KEY AT ANY LEVEL PARENT, GRAND PARENT, .... , GRAND GRAND GRAND PARENT, ...ETC (IF IT WERE POSSIBLE EVEN TOUGH A TWO/THREE OF AT LEAST FOUR LEVEL ARE MORE
THAN ENOUGH IN MOST CASES)
Having all this I just need a method for “passing” the values that I want to pass back to the Form as to continue newer insertions (Bulk Insert)
Member
242 Points
480 Posts
Hunter/Ebbo/Anderson (Update)
Oct 01, 2010 11:14 AM|klca|LINK
Hola to all of you,
As you can see I have been investigating about this issue for a long time (almost a year) and still no answer.
It might seem silly to you the kind of approach in looking for an answer because you might as well think: Why doesn’t this guy simply customize each one of his screens and avoid all problems that he is facing trying to solve this?
The answer is rather silly too: Dynamic Data works based on templates and I am looking to solve this problem globally, for any model that I might have, for any new Dynamic Data application I’d could start developing.
That’s the point: I don’t want customized solutions but a global one.
In this case you can see that even tough there are many ways of getting the values that you have just used in a previous entry in the Insert page, and not forgetting that Dynamic Data resets everything (specially dropdownlists to [No Set]) after every new insertion.
There are also ways for starting building complex algorithms as to create a matrix capable of containing: values, type of control, column name, primary key name, foreign key names, etc.
The problem is that you have to create a lot of Session variables (or whatever comes to your mind) as to simulate “state” (don’t even know if that could be the proper word) which are of course unnecessary because I know for sure that there must be a way of getting all of this at once.
In fact, Dynamic Data does it internally as to make proper insertion in the database.
So here goes my question again:
Is there a way of getting the whole set of values/definitions of a previously inserted page as to manipulate them accordingly?
For instance and as to contribute a little bit in the discussion of “Cascading”, there should be a way of retrieving properly the “chain” of “referential integrity” at once for every foreign key column:
So if you had for instance:
Let’s use the following notation: <tablename>.<column>
Let’s also say that Catalogue ahs a column showing a Foreign Key: Catalogue.TypeOf Product_Code
Let’s suppose that the primary key for the table TypeOfProduct is the column TypeOfProduct_Code which is the primary key of that table and also of the type Identity.
Let’s also suppose that the table TypeOf Product also has a foreign key:
TypeOf ProductCode.Company_Code which belongs to the Company table whose primary key is Company_Code.
So I have 3 tables: Catalogue, TypeOf Product and Company.
If I have an Insert page showing a dropdownlist for TypeOf Product_Code while inserting in the Catalogue table there should be a way of getting:
Catalogue.Catalogue_code shown as Primary Key, Int32, Identity, Catalogue.Product_Name shown as String, 60 length, “Tuna Fish” …
… more Catalogue columns
Catalogue. TypeOf Product_Code shown as Primary Foreign Key, Int32, 23456 (e.g.)
Catalogue. Company_Code shown as Foreign Key, Int32, 6543 (e.g.)
SORRY, I FORGOT TO WRITE THE MOST IMPORTANT INFORMATION OF ALL:
FOR EACH ONE OF THE ABOVE IT WOULD BE NEEDED TO HAVE THE NAME OF THE TABLE WHO ORIGINATED THE KEY AT ANY LEVEL PARENT, GRAND PARENT, .... , GRAND GRAND GRAND PARENT, ...ETC (IF IT WERE POSSIBLE EVEN TOUGH A TWO/THREE OF AT LEAST FOUR LEVEL ARE MORE THAN ENOUGH IN MOST CASES)
Having all this I just need a method for “passing” the values that I want to pass back to the Form as to continue newer insertions (Bulk Insert)
Is that possible at all?
Carlos Porras (El Salvador)