In my database table , I have field to store the text, I am tryinf to find the length of the filed in ASP like below
response.write len(rs("cname1"))
It is displaying the value , when the data in the field is nonzero, it is not displaying anything if the filed is mty in table. I cant understand y it is displaying the length as 0 , bcaz i want to compare the length , if the length is zero , it will display one result or else it will display the value.
so basicly if the user enters a 5, 4, 3, or 2 digit number the input will be forced to it's maxlength. I need this because I am writing to an SQL db and am combining multiple form inputs into one field in the db table ie(variable = A&B&C&D)
On a different webpage I need to display the variables. I am doing this by string manipulation functions like the one below.
This all works, but the table width can only be 770 pixels. If the menu structure is going to be wider than 770 pixels it has got to be devided into 2 or more lines.Is it possible to determine the pixels word by word?Or is there another possibility?On Google I read it would be possible in java, php,Only I didn't find anything that refers to ASP.
I'm really at wits end on this as I'm not having much success with locating a function or other options I have. I'm working on a message board for a website and I'm needing to check the length of the words that users put in.
For example, when someone puts in "yesssssssssssss!", I put together a small function that omits all of the s's as this is wreaking havoc on the layout of tables within the site. But I don't have a solution if someone types in "ssss sasdfjskldjfaskld;jfaskdf" as random ambiguous letters.
I know I can check the length of the entire string but don't know to check the words within it.
I have problem with multi-language string values. I have an input box, which accepts max 75 chars. Value goes to SQL server table field VARCHAR (75). it was okay with english language but error comes when saving Arabic or any RTL language.
I checked the values by Response.write len(myRecievedString)
OutPut:
Lenght of String Containing 75 English chars: 75 Lenght of String Containing 75 Arabic chars: 525
i have a webpage containing a textbox (textbox1) and a label(label1).As the user is typing into the textbox i want the label to show the amount of characters they have typed. How do i go about doing this?
I currently have a program that crashes if the sessionid is longer than 9 digits. Is there a way to trim the length of the string that IIS kicks out and limit it to 9 digits, or if that can't be done, is there a function I can use to trim the 10 digit string down to 9 digits?
I am pulling info from a sql server By default the query pulls back the inforamtion as text.Therefore when I go to calculate some figures its giving me a type mismatch error. Is there a function in can call to convert a text string to an integer string using
rstSearch.Fields("name").Value .To pull back the info in a for loop
Error Type: Microsoft VBScript runtime (0x800A000D) Type mismatch
I need to parse a string from a single, semi-colon delimited, 60 character field (el_text) in a recordset and display the results in a table on a webpage (ASP)
I can retrieve the recordset from the database and display the field data results in rows of a table but have the entire 60 character string in one cell. I need to break that string apart and put each semi-colon delimited value in it's own cell. Then move to the next record and do the same thing in the next row of the table. - and so on
I'm using ASP, VB Script with DMSII Database and OLEDB
Does anyone have some code examples on how to break this field apart and then arrange the data into an html table on a webpage?
does ASP have arrays, and if so, can I use an array, inside a loop, to do the following.
x=field name *the field is now comma separated values* while x != rs.EOF take each part of x , put into array. filter recordsetABC with current part of X. display filtered recordset on screen. next x
My syntax is horrible, so ignore that, this is just a theory exercise right now.
at one page it works fine and when i use the same kind of code to update another TEXT field it doesn't update and the I.E. loading bar increases very slowly and the next page never loads someone suggested to use .appendchunk i used rs.appendchunk and i got the error "object doesn't support this property or method" he also said that .appendchunk cannot be used to update nvarchar.
i removed the code to update TEXT field and the page loaded as expected (normally)! Why one text field worked fine while the other didn't?
I need to parse a string from a single, semi-colon delimited, 60 character field (el_text) in a recordset and display the results in a table on a webpage (ASP)
I can retrieve the recordset from the database and display the field data results in rows of a table but have the entire 60 character string in one cell. I need to break that string apart and put each semi-colon delimited value in it's own cell. Then move to the next record and do the same thing in the next row of the table. - and so on
I'm using ASP, VB Script with DMSII Database and OLEDB
Does anyone have some code examples on how to break this field apart and then arrange the data into an html table on a webpage?
i have a table in which i have many text boxes, they are named as a1,a2,a3,a4 to a16 the next row is b1,b2,b3 to b16 and so on up to G1,G2 etc, where the user enters his data, what i want to do is only allow the user to enter numbers, which can have decimals if required,
how can this be done, also i have another set of textboxes through which i want to loop and prevent user the user from entering the same data in more then one box how can this be done any help will be appreciated thank you.these are the text boxes a1,b1,c1,d1,e1 etc which is actually the first column in the table.
I am trying to write some code that inserts or updates a text field in my SQL Server 2000 database. The SQL statement is created using a submit from a form, and the text is coming from a <textarea>, and therefore being placed into the SQL statement via a Request("field"). However, due to limitations in SQL Server 2000 and text fields, I can not use a simple Update or Insert command with text over 8000 bytes.
Does anybody have any sample statements that will help me update that field with larger amounts of data? I have tried using the WRITETEXT function and UPDATETEXT function with little or no success.
i have a form that has two hidden fields.The first hidden field will has a value like this 'EM12HILL.JPG'.The second hidden field has a value like this 'AA01'.What i would like to happen is when submit button is pressed, the characters in the first hidden field will change to the following 'AA01HILL.JPG', as they are passed to another form.
Is it possible to recall a variable with the combination of text + rs.field? i want to recall the variable "speler1", at the place weher rs("speler") is 1. It's probably again easy.
I been searching google but I can't find how to shorten a text field and if it has been shortened to place a space and triple dot (...) after it. So if the text field was 75 characters long it would shorten it to 50 and add " ...". Is it also possible to shorten it to 50 to the nearest word? This is what I got so far: Code:
... <td> <p> <% = left(rs("my_text").value,50) & IF rs("my_text").count > 50 Then Response.Write(" ...") End If %> </p> </td> ...
In a form I have one pulldown menu, and one text field. Both MUST get their values from an Access database they connect to. Without submitting the form, how do I change the value appearing in the text field by changing the selection in the pulldown menu? Remember both the text field and the pulldown menu MUST get their values from a database.
I need a user to follow a format. For example entering a date. I need the user to enter a date in this format MM/DD/YY. How do I check to see if they followed that format?
I need the user to enter a currency amount without the "$" sign. How do I check to see if the Request.Form("price") value has a "$" sign in it? I guess I need to know how to parse a string in ASP.
I have an asp page that allows cdont mailing of form field values to persons matching slected criterea in their profile.
Works good if the user goes straight from the form to the email-making asp.
Then the user asked for a proofreading screen and what seemed simple took a bad turn.
When I try to pass from the proof reading screen to the asp that actually sends the email I only get the first word. as soon as a blank is encountered in the text it thinks it it done. Code: