Form field problem

J

Jim Baughman

I have a form to update a an SQL database and one of the
fields needs to have values like 8 - 24 entered. But
when the submit is hit on the web page it sends -16 to
the DB. If I manually enter it the SQL DB with SQL
Manager it allows that format and dose not do the math.
How can I stop the WEB page from doing the math?
 
K

Kevin Spencer

8 - 24 is a mathematical expression. What data type is the field?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
 
J

Jim Baughman

Well that most likely is the problem. I creadted One
page to be dynamic in the form creation so that I would
have a lot of code. Basicly it reads the fields from the
SQL db and creates them as text boxes on the form. If
you know what field needs to be set to prevent this with
out it being dynamic then I will just hard code the page
so that it handle it correctly. The SQL field is set to
varchar.
 
K

Kevin Spencer

If it's a varchar field, you need to enclose '8 - 24' in single quotes.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
 
J

Jim Baughman

Found the problem was in the SQL Update line, need to
and ' infront and back of that fields entry in the update
line.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top