macupryk Posted January 14, 2004 Posted January 14, 2004 I am building a six page survey and I was wondering if u could give me a few tips or if u know of some sites that have examples. One procedure should create the tbl_User_Signup row for the user AND a row in each of the five one to one tables. It should all be wrapped in a transaction with roll-back to ensure it either completes successfully or is rolled back for another try. The methodology for this would: If the user looses the connection in the middle they can return and the system will take them to the point where they left off. The data entered before the connection break is safe in the database so they don't have to start over. For one simple form it is ok to hold the data in memory or the current web page. What happens if the user decides to cancel in the middle of the sign up process? You delete the tbl_User_Signup record for the client and the delete cascade deletes the related records in the other five tables. So u someone help me with some model or some t-sql. 1) SignUp.aspx 2) PhysicalCharacteristics.aspx 3) PersonalityTraits.aspx 4) PersonalDetails.aspx 5) PersonalInterest.aspx 6) Questions.aspx Now I created the db with the appropriate links. CREATE TABLE [dbo].[tbl_User_SignUp] ( [userID] [int] IDENTITY (1, 1) NOT NULL , [userName] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [PasswordHash] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [salt] [nvarchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [HeadLine] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [Title] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [FirstName] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [LastName] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [nvarchar] (75) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [secretWordType] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [secretWord] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [Age] [int] NOT NULL , [DOB] [datetime] NOT NULL , [Zodiac] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [GenderID] [int] NOT NULL , [City] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [stateProvinceID] [int] NOT NULL , [CountryID] [int] NOT NULL , [DateCreated] [datetime] NOT NULL , [LastLogin] [datetime] NOT NULL , [LogCount] [int] NOT NULL ) ON [PRIMARY] GO CREATE TABLE [dbo].[tbl_User_PersonalDetails] ( [userID] [int] NOT NULL , [sexualOrientationID] [int] NOT NULL , [DrinkingID] [int] NOT NULL , [ReligionID] [int] NOT NULL , [smokingID] [int] NOT NULL , [OccupationID] [int] NOT NULL , [DrugID] [int] NOT NULL , [EducationID] [int] NOT NULL , [MaritalStatusID] [int] NOT NULL , [incomeID] [int] NOT NULL , [ChildrenID] [int] NOT NULL , [RelocateID] [int] NOT NULL , [WantChildrenID] [int] NOT NULL ) ON [PRIMARY] GO CREATE TABLE [dbo].[tbl_User_PersonalInterest] ( [userID] [int] NOT NULL ) ON [PRIMARY] GO CREATE TABLE [dbo].[tbl_User_PersonalityTraits] ( [userID] [int] NOT NULL , [AdaptableID] [int] NOT NULL , [AdventurousID] [int] NOT NULL , [AffectionateID] [int] NOT NULL , [AggressiveID] [int] NOT NULL , [AloofID] [int] NOT NULL , [AmbitiousID] [int] NOT NULL , [ArrogantID] [int] NOT NULL , [ArtisticID] [int] NOT NULL , [bossyID] [int] NOT NULL , [CalmID] [int] NOT NULL , [CaringID] [int] NOT NULL , [CharmingID] [int] NOT NULL , [CleverID] [int] NOT NULL , [CompassionateID] [int] NOT NULL , [CompetitiveID] [int] NOT NULL , [ConfidentID] [int] NOT NULL , [CourageousID] [int] NOT NULL , [CreativeID] [int] NOT NULL , [DeepID] [int] NOT NULL , [DisciplinedID] [int] NOT NULL , [DIYID] [int] NOT NULL , [DominantID] [int] NOT NULL , [EfficientID] [int] NOT NULL , [EnergeticID] [int] NOT NULL , [ExtrovertedID] [int] NOT NULL , [FaithfulID] [int] NOT NULL , [FlexibleID] [int] NOT NULL , [ForgivingID] [int] NOT NULL , [FrugalID] [int] NOT NULL , [GenerousID] [int] NOT NULL , [HonestID] [int] NOT NULL , [HumorID] [int] NOT NULL , [impulsiveID] [int] NOT NULL , [independentID] [int] NOT NULL , [intellectualID] [int] NOT NULL , [intelligentID] [int] NOT NULL , [KindID] [int] NOT NULL , [LazyID] [int] NOT NULL , [LeaderID] [int] NOT NULL , [LovingID] [int] NOT NULL , [LoyalID] [int] NOT NULL , [ModestID] [int] NOT NULL , [MoralID] [int] NOT NULL , [NeatID] [int] NOT NULL , [OpenMindedID] [int] NOT NULL , [OptimisticID] [int] NOT NULL , [OrganizedID] [int] NOT NULL , [OutspokenID] [int] NOT NULL , [OverAchieverID] [int] NOT NULL , [PassionateID] [int] NOT NULL , [PatientID] [int] NOT NULL , [PerfectionistID] [int] NOT NULL , [PersistentID] [int] NOT NULL , [PunctualID] [int] NOT NULL , [ResilientID] [int] NOT NULL , [selfAwareID] [int] NOT NULL , [sensitiveID] [int] NOT NULL , [sincereID] [int] NOT NULL , [spontaneousID] [int] NOT NULL , [stubbornID] [int] NOT NULL , [submissiveID] [int] NOT NULL , [successfulID] [int] NOT NULL , [superstitiousID] [int] NOT NULL , [supportiveID] [int] NOT NULL , [uncomplicatedID] [int] NOT NULL , [underAchieverID] [int] NOT NULL , [understandingID] [int] NOT NULL , [VivaciousID] [int] NOT NULL , [WarmHeartedID] [int] NOT NULL , [WiseID] [int] NOT NULL ) ON [PRIMARY] GO CREATE TABLE [dbo].[tbl_User_PhysicalCharacteristics] ( [userID] [int] NOT NULL , [NationalityID] [int] NOT NULL , [EthnicBackgroundID] [int] NOT NULL , [AppearanceID] [int] NOT NULL , [bodyTypeID] [int] NOT NULL , [ComplexionID] [int] NOT NULL , [HairStyleID] [int] NOT NULL , [HairColorID] [int] NOT NULL , [HeightID] [int] NOT NULL , [WeightID] [int] NOT NULL , [EyeWearID] [int] NOT NULL , [EyeColorID] [int] NOT NULL , [FacialShapeID] [int] NOT NULL , [FacialHairID] [int] NOT NULL , [FashionSenseID] [int] NOT NULL , [TattooID] [int] NOT NULL , [JewelryID] [int] NOT NULL , [PiercingID] [int] NOT NULL ) ON [PRIMARY] GO CREATE TABLE [dbo].[tbl_User_Questions] ( [userID] [int] NOT NULL , [iPreferToBeWithID] [int] NOT NULL , [ifMyLifeWereABookID] [int] NOT NULL , [intentionID] [int] NOT NULL , [WhenIThinkAboutMoneyID] [int] NOT NULL , [ifMoneyWereNoObjectIdLiveID] [int] NOT NULL , [ToProveIAmRomanticID] [int] NOT NULL , [PublicDisplaysOfAffectionID] [int] NOT NULL , [AsACommunicatorIWouldDescribeMyselfAsID] [int] NOT NULL ) ON [PRIMARY] GO Quote
Moderators Robby Posted January 14, 2004 Moderators Posted January 14, 2004 If you're commiting on each page/section then you won't be able to rollback, and as you stated... if the client loses the connection then they need to re-start the entire app. I think that your asumptions with the 'cancel' is fine. Quote Visit...Bassic Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.