Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-07-16 : 08:47:31
|
| mullet writes "I hope you don't think the question is going to be as easy as the title suggests. I'd better give you a little bit of an explanation as to what i'm doing.I have 3 tables I'm concerned with (much simplified for ease of understanding):tblProperty { PropID, Prop_Desc, Prop_Price }tblProperty_Additional_Attributes_Key { AttID, Att_Title, Att_Description, Active_ind, Deleted_ind }tblProperty_Additional_Attributes { ID, PropID, AttID, StringValue }The idea being that there is a generic list of Property attributes in tblProperty, while the admin can ammend tblProperty_Additional_Attributes_Key to add/delete/modify additional attributes, which will then be displayed to a user when adding a property to the database.The form the user sees when adding is generated statically using the default property , and also dynamically by checking for active additional attributes in tblProperty_Additional_Attributes_Key. The additional property attributes will be inserted into tblProperty_Additional_Attributes, effectively creating a dynamic property details database structure, rather than storing all the info in one table.As all of the items in the form are being inserted relating to the same property, and in to different tables, what I need to do is to insert the default attributes into tblProperties, returning the @@IDENTITY, and then use that to insert an unlimited number of items into tblProperty_Additional_Attributes.I will be using a transaction (via ASP, as i also have multiple images to upload to the filesystem). My problem is, how do i pass a completely dynamic list of attributes to a stored procedure, along with the default ones, and perform these INSERTs?I'm using Win2k Server and SQL Server 7, service packs unknown.Any help/advice greatly appreciated.mullet" |
|
|
|
|
|
|
|