Solved

Using Forms with ASP/ADO/VBScript

Posted on 1999-01-23
3
145 Views
Last Modified: 2013-12-25
I have an Access database with 1 table. Most Items within the table are text with the exception of 2 items that are Integers. The form, of course, has fields contained with the database. 2 of the fields that are Integer types within the database are defined in HTML like all other fields (Input type=text...). Here is my problem: if the fields that are of the type integer have not been filled in upon submitting the form, I get "type mismatch" error. If the fields have info everything is fine. Also, I do not require the fields to be filled. I also understand the the Val function in VBScript does not work correctly.
Please help!
0
Comment
Question by:vmorales
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
MasseyM earned 70 total points
ID: 1859164
Do a check before posting to the database.

PostNumber1=Request("TheField")
If PostNumber1 = "" then PostNumber1 = "0"
Rs("TAbleField1") = PostNumber1

Just check to make sure it has a value.

If you need more help, please email me at masseym@mrqcorp.com nd include the database and all ASP pages.

0
 

Author Comment

by:vmorales
ID: 1859165
Thanks MasseyM,

That was a simple solution. I suppose I made the problem more complex than it was.
By the way, I work for a financial institution and wear many hats. I noticed that you have started your own company. I would be interested in so material/information about your company. We will be in the near future look into offering Internet services. At this time I am working on a intranet project. I will email you with an address to sent info to. Again, thanks.
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1859166
That sounds very good.  YOu can email me at masseym@mrqcorp.com.  I am still in the process of coming up with "material" to send, but will have it within the next two-three days.  I will await your email.

Thanks,

Matt
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now