im inserting some data into a number field but when i have something like 0000006 it chops it to 6 in the database. and not always are the same number of zeros present. why im not sure just what i have to work with.
I understand that i could make the db value varchar and just validate it by doing something like Isnumeric. But is there a way to keep my zeros but leave it a number field.
How can I read back info from a database into an input field (in case it's to be edited) that will preserve the zeros to the right of the decimal?The zeros are being preserved in the access database when I have a look at it there. I have the field defined as type "Currency" to two decimal places.
I want to preserve those zeros to the right of the decimal point when I read the record into an input tag on a web page.I am trying to use "FormatCurrency(request.form(exp, 2))" and "FormatNumber(request.form(exp, 2))" but it doesn't help.
I need to display the leading zero on dates and times for all dates and times e.g 02/02 for February 2. I only get 2/2 or 08:00 for 8 o'clock in the morning.The code I'm using Code:
i have found a problem on my webite is when i try to enter details of a new book into the DB, i input the ISBN as its uniqueID, the problem is that if the ISBN starts with a zero, (i.e. 07987654) the DB will remove the zero from the start of the ISBN (i.e. 7977654). Can someone tell me how to force the DB to store the whole number including the zero at the start?
I have a textarea, that when you insert your cursor into it anywhere except for in the very first line, the cursor falls into the second line. When the form is submitted there is a carriage return at the beginning of the text that I'm having trouble getting rid of.
I tried to Trim() the string both before inserting it into the database and when writing it to the page, but apparently that doesn't strip off carriage returns (even though I've read it does.)
I am inserting a telephone number into an Access db. The field is set to a number, with no input mask or formatting. Whenever I insert a number beginning with a 0 as most telephone numbers do, it removes the leading 0.
How do I go about inserting a number into a varchar column without it being stripped of the leading zero? IE. I'm trying to insert 012345 into a varchar column, but what gets inserted is 12345.
I have a querystring that passes through the value 001 for example, the form on the receiving page need to display that number but with 1 added to it. i have
dim strnum strnum = request.querystring("value") strnum = strnum + 1
when displayed <%=strnum%> shows 2 instead of 002, and the zero's are very important, is there any number formating trick i dont know or another way of doing this?i thought about coding the first two zero's in before i call the strnum but this would mess things up when i get to 010 etc.
I'm UPDATING a value into an Access text field from a page but I can't get it to do the UPDATE without adding a leading space to the value??
This is a problem because I have another page where a user can search the entries, but when they do a search by this particular criteria, it returns no entries (ie. Search good_bad by "Positive" returns no results, but Search good_bad by " Positive" will return the proper results).
The value is coming from a option select box. It seems to only be a problem doing an UPDATE using a value from a select box as I'm using the EXACT same code to do an INSERT where the value comes from an INPUT box and it inserts with no leading space?? Code:
I have a form that pulls a zip code and insterts it into a access database via ADO/ASP. When the data is inserted with a 0 in the front (ex: 03490) the leading zero is dropped.
Anyone know a quick solution for this problem, without having to add validation to the database (zerofill, etc) ie; some ASP function...
I'm pasing a zip code as a prameter to an Access stored procedure. In Access the parameter is a text data type. It works for non-leading zero zip codes but, apparently access (or ASP) is converting it to a value first (dropping the zero) then sending that to my SP.
Even if I use cStr() to be sure the parameter is sent a string it still seems to drop the leading zero. Any thoughts? Note: It needs to be a string for canadian zip