Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Processing Forl
Message
 
To
07/12/2000 10:58:22
Todd Wolfe
Certified Marketing Services
Kinderhook, New York, United States
General information
Forum:
Internet
Category:
Active Server Page
Title:
Miscellaneous
Thread ID:
00450396
Message ID:
00450438
Views:
32
Todd;

> I have a form with sevaral objects on it. Such as check boxes. Option Boxes, Select lists, text boxes. Is there an easy way to process this form to my SQL server database using ASP?

The short answer is yes.

Everything is simple when you know how. Where have I heard that before? This is my approach and others I am sure will have a different way to accomplish what I am about to describe.

The simplest approach is to create an ASP form, create an ADO object, Connection and Recordset. On your form you will have objects that are bound to your recordset object. When you click on the Submit command button it will send the form contents to a second form which will process and update the data. The way I do it is to have four forms as follows. One for View/Edit with a form to update data and an Add form with its form to Add new records.

I cannot use the correct symbols so you will have to just try to understand the basic concept.

Now you use the Form Tag with something like this: Action= Method=POST

Form Action=ResponseE.asp Method=Post
Your objects go here.
/form

Action will point to the form you use to save the original forms data which will occur when you select the Submit button.

A better way I feel is to do the following:

Form id=frmFirst name=frmFirst Method=Post
Your objects go here.
/form

script Language=vbScript
Sub cmdSave_OnClick()
‘ Data validation goes here
call frmERBDetail.Submit
location.href = "ERBResponseE.asp?proj_id=" & sEditID & "&Mode=Edit"
End Sub
/script

You can place form level data validation in the save routine and object level data validation can be created using OnBlur().

Something I found most helpful is to use the html maxlength for an input textbox to prevent the user from attempting to enter too much data into a text box. I use ADO to do this and if the size of the data field changes it is automatically adjusted. I do not like to hard code things like that.


I have left out the specifics and have attempted to give you an overall concept of how you might use ASP and SQL Server. Any specific questions?

Tom
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform