Solved

Using Forms with ASP/ADO/VBScript

Posted on 1999-01-23
3
146 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Link to post behind image slider 1 49
Problem to ToolkitScriptManager 2 51
responsive divs setup - what am I doing wrong 2 60
Form Processing in PHP 11 29
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
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 learn how to count occurrences of each item in an array.

947 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

22 Experts available now in Live!

Get 1:1 Help Now