Numeric Entry
how to control numeric entry into a textbox? so that no other character is allowed only numbers and decimal?
View Replieshow to control numeric entry into a textbox? so that no other character is allowed only numbers and decimal?
View RepliesI need to display in my form fields the last record in my access database, which is a numerical value, then add 1 to that value. The code i have so far is: Code:
View Replies View RelatedI'm trying to write an SQL statement that will pull out only numbers from a field. Within that field will be records that contain text, but i just want the records that have numbers in that field. Can I say something like:
SELECT *
FROM Table
WHERE Variable = Numeric
Is something like that possible?
After moving my website from one server to another (Windows 2000, IIS 5,
same as old server), I am forced to use the cInt function to convert all
variables that compare against a numeric value.
For example, on the old server I could code something like this:
If sRecCount > 0 then . . .
The new server requires me to use:
If cInt(RecCount) > 0 then . . .
If I don't use the cInt function, I get a Type Mismatch error. I can't see
anything that is different from one server to another.
Any ideas?
How can I check that entered value in a text box is numeric or not in next page?
View Replies View RelatedI have a variable I'm pulling from a database that's a phone number in XXX-XXX-XXXX format. What I'm looking for is a way to strip out all non-numeric characters from the variable (XXXXXXXXXX). I don't want it to look only for "-", since sometimes, there are also alpha characters entered as well.
View Replies View RelatedI made up a table in database with access consists of columns with text type. Some of them I put in data with numeric value and some of them I put in "Unlimited" as the value.
Then, I allowed people to insert data but only with conditions. They can insert data if the value they are trying to insert is smaller than the one in the database. For "unlimited" value, they can insert any value.
My problem is.... if the limited value in the database is 35, we cant insert data of 40 but we can insert data of 100. It seems that the code only takes the first number to be compared to the value in the database. Code:
I need some help on validating the number entered by the user in the ASP form .
The number should be accepted in the format : 1,234.5648 and should be rejected in the format : 1, 234.456.46 or 1, 234.456 i.e. the format with more then one blank space or more then one decimal point etc.
i am trying with /^[0-9]*.[0-9]+$/; format. I checking all space and decimal point but also not taking data like 1.234
if i have a text as follow :
my phone number is 0123456789
i need to check the text and not allow to have more than 7 digit number occur in the text and then change the 0123456789 to xxxxxxxxx.Finally the text will become :
my phone number is xxxxxxxxxx
I have a few ASP pages for my companies web site that allows members to enter reports. A big problem I am running into is for dollar amount/numeric data. The entry line consists of 7 input boxes.
3 of those boxes are used for dollar amounts, but I am having a problem when the member types anything other than what is expected; instead of 32.56 they may type in 32..56 this is just one of the types of keying errors. When the page is submitted and the validation/update script runs I will get "Type mismatch: 'ccur' " errors and the script will stop. is there a way to validate the numeric data so I can avoid these problems?
Normally to declare a value as numeric I use Clng() HOWEVER I now have some Numeric values with decimal places, which I need to tell the page when they are picked up from the form that they are in fact numeric, but retaining the decimal places too, which would I use... as all the ones I have used previously Cint, Clng, Fix, etc. do not retain the decimal places.
View Replies View RelatedI just can't seem to figure out this problem Here's the code:
minv = request.form("min")
maxv = request.form("max")
price = request.form("price")
Response.write(minv &" "& maxv &" "& price)
sSQK = "INSERT INTO tbl_weight (min, max, price) Values (" & minv &","& maxv &",'"& price &"')"
conn.Execute(sSQK)
Response.write("Gegevens toegevoegd!")
But it just keeps givving me an error
"Microsoft JET Database Engine error '80040e14'
Syntax error in INSERT INTO statement. "
I think it has to do something with the "minv" and "maxv" those two are numbers and if I remove them the INSERT command goes fine... but what am I doing wrong ?
I recently moved our website to a new server (Windows 2000 / IIS 5 - same as
the previous server), and now I get type mismatch errors whenever a variable
is compared against a numeric value, unless I use the cInt function to
convert it to an explicit integer type.
For example, the following code:
dim sRecordCount
[open a database and assign the record count to the above variable...]
if sRecordCount > 0 then ...
On the new server I am forced to use: if cInt(sRecordCount) > 0 then ...
I can't figure out what has changed, if anything. Same OS version, same IIS
version.
Any ideas?
I need access to the bits of a Byte expression and the logical functions operatge bit-wise on numeric vales - per the VBScript CHM.
So how do I convert a Byte to its numeric value?
i have numeric value in my database with two decimal. now i have search page where user can type numeric value. so i want to compare user entered value with my db value. the result will give less than or equal value to user entered value. i had tried following
est = request.form("est")
sql = "select * from mytable where est_cost <= '%"&est&"%'"
but is not working. i think there is some syntax error in comparing numeric value.
How do I do that? This is for some bit-diddling, but the logical functions like AND require numeric expressions, per the book.
View Replies View RelatedHow do I change this output to give me numbers instead of letters: Code:
Dim intCounter, intDecimal, strTicket
For intCounter = 1 To 6
Randomize
intDecimal = Int((26 * Rnd) + 1) + 64
strTicket = strTicket & Chr(intDecimal)...
I have a text file that I'm reading into a SQL table, from there I need to run various scripts on it to clean it up. One being, there is field that comes in as:
ie:
JNJG12345
MAN5678
XY4656565
I need to split this by Alpha characters, then Numeric characters and be able to input them into seperate fields as such:
JNJG 12345
MAN 5678
XY 4656565
I have managed to locate a script that Memnoch came up with: http://forums.aspfree.com/t24666/s....ht=split+string that managed to get me where I am now.
How do I get the loop to stop once it finds the first occurence of a number? Below is the code I am using.
Code: ....
i have 3 columns in sql server . all of them are numeric value. when a user enter my site i take the value of userid (numeric one) i assign it as session("userid ") . after a query i take 2 value (both numeric again) from my table and write this code.
if towhom=session("userid") then towhom=fromwhom . it gives an error .. how can i solve it. Type Mismatch Error .
I need to create an ADO Parameter object with the "Numeric" type. How do I go about this?
I thot that I'd be able to follow the pattern of creating ADO parameters with the more "regular" types (Varchar, Integer, etc..) but apparently, there's some conflict somewhere between my ASP line that calls ADO's CreateParameter method, the ADO Command's Execute method, and the SQLServer Stored Procedure's parameter declarations. Code:
What i have is a form that puts data into a DB. But what i need is for the page to display the reference a field in the row the data has just been entered.Does anyone know how to do this?
View Replies View RelatedI have a booking page that the user enters 2 addresses date and time etc
what I need is the option for the user to select multiple date entries for
the same journey or maybe multiple days ie they want to travel the same
journey every Monday or every weekday etc.
i m making a page on login basis, i hve an access datbse, after login user will enter a code which is already store in datbase, then form checks if this code is in databse if found then it will show some other records in databse, otherwse disply msg, user enter data in fields, after completing data cursor must go to code agian for another record, this data entry is in bulk, mean 200 recrds or more in one session, so may be i use batch procdure, then form save the records, same time a link on pge to edit this record, or if no code availble , operator can add new records
View Replies View RelatedI'm building a data entry and search tool. I've created a basic search facility and it seems to work ok but I don't know the code to create 'data entry' buttons. I want something that looks the same as the search facility but the submit button creates an entry in the databaseCan anyone give my the relevant commandscode?
View Replies View RelatedI have an ASP page that allows the user to input specific fields which in turn update a database. I have managed to get this working although I have one more question.
Can I format the fields so they are not all in a line. Maybe two per line. THis was the user can see all the fields at once without scrolling right and left. Code:
This is about a simple form validation in asp using javascript.there is one field called invoice_number which requires an unique invoice number as input. Whenever user inputs duplicate values message should pop up as warning on submit of the form. A sql fetches all the invoice nos. from database into an array using getrows.how do i use the result of getrows in javascript to perform client side validation
View Replies View Relatedwhats the best way for me to validate the data that has been put into a form on my page?
View Replies View RelatedI have a DB with 3 fields.
ID
Name
EMail
If I write an entry into this DB, Name and EMail, the ID is auto increment. How can I detect what ID has been created ? I want a user to submit details to me, they get the ID as a ticket number ?
i have a question and comment page for students to comment on tests. each question is set with an auto-ID number.
I have the comments saved to access database but it only holds one comment, or record to the question with the ID number. Everytime someone makes a new comment, the other comment is lost and it only shows one comment. I use the <%=objRS("comment")%> and it will show that one comment, but I need away to show all comments to each individual question. Is there someway I can alter the database (comment table) or that <%=("comment")%> command to show all coments by the question id number?
used to other languages and using ASP for a particular project. Is there a way in which I can remove the first element from an array and then return the array with remaining elements intact?
View Replies View RelatedDoes anyone know how I can use asp to access a specific entry in a microsoft access database table without having to run a search of the entire database? I figure this can be done with the primary key, but I'm not sure how to do it. I've looked for tutorials, but none seem to deal with this.
View Replies View RelatedI am having considerable difficulty figuring out how to delete more than one entry in my online database at a time. I thought I had it
Sub Delete()
SET Conn = SERVER.CREATEOBJECT("ADODB.Connection")
Conn.OPEN "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("/db/database.mdb")
sqlWhere = ""
aSelected = request.form("Select")
sqlWhere = "ProspectId IN ('" & aSelected & "')"
sql = "Delete * from tblProspect where " & sqlWhere
Conn.Execute sql
Conn.Close
Set Conn = Nothing
RESPONSE.REDIRECT("prospects.asp")
End Sub
I need to write an ASP page that will allow a user to paste in data from an Excel spreadsheet. The data will only be in one column. I'm not a web programmer and would like some advice on the best way to do this.
I have a page working using a text area and some JavaScript to parse the data entries using the split function. This seems to work ok but I wondered if anyone could suggest a better way?