Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Using Forms with ASP/ADO/VBScript

Posted on 1999-01-23
3
Medium Priority
?
164 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 280 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.
Suggested Courses

927 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