Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old November 23rd, 2008, 06:29 PM
Authorized User
Join Date: Apr 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help with Inserting new record with detailsview

Hi there, I am using a detailsview control to insert a new record in SQL Server Express 2008 table. The table “RefData” has following fields. Apart from the first three fields, all fields require user input as listed below. First three fields are meant to be auto generated.

[u]SupplierFlightID:</u> Primary Key (IS Identity set to yes, Identity Increment set to 1)
[u]UniqueID: </u> (This field I want automatically generated by combining Carrier & StartDay & EndDay & SchFlight)
[u]SupplierName:</u> American Airline (This field needs auto filled with the user log in name)
[u]Carrier:</u> AA (User input)
[u]StartDay:</u> 01/01/1900 00:00:00 (User suppose to enter a weekday, possibly in ddd format so Mon, Tue etc)
[u]EndDay:</u> 07/01/1900 00:00:00 (User suppose to enter same as StartDay
[u]SchFlight:</u> AA640 (User input)
[u]SchDepartTime:</u> 30/12/1899 07:55:00 (User suppose to enter a time in time format so hh:mm, if possible this could be dropdown list that will have list of times with 5 minutes gap in each value)
[u]SchArriveTime:</u> 30/12/1899 13:35:00 (Same as above)
[u]SchArriveDayPlus: </u>0 (User Input)
[u]SchDestination: </u>New York (User Input)
[u]FinalDestnation:</u> New York (User Input)
[u]StartDate:</u> 26/10/2008 00:00:00 (User Input if possible a calendar tool to select a date)
[u]EndDate:</u> 29/03/2008 00:00:00 (User Input if possible a calendar tool to select a date)

Can someone please help me with this, am I doing the right thing by using detailsview control? All I need is a data entry form that will allow the user to update the RefData table. I don’t need master detail page as such? I have been playing with detailsveiw control without success for last couple of days, had many problems due to database constraints and weekday, date, time formats. The values shown against the field names show the column formats. Thanks in advance for your help. gsrai31

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using DetailsView control to add record to Child megnin ASP.NET 1.x and 2.0 Application Design 0 September 5th, 2008 03:37 PM
problem inserting a record with autonumber phytos VS.NET 2002/2003 2 January 16th, 2006 07:14 PM
Checking a Database before Inserting a Record vbmazza VB Databases Basics 2 April 28th, 2005 07:23 AM
Inserting A Record Set nikotromus Access VBA 3 September 14th, 2004 01:23 PM
Select record after inserting it whyulil Classic ASP Databases 13 April 26th, 2004 06:05 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.