Results for "Category: String Manipulation"
Teaches you how to allow your users to build a dynamic sql statment for searching your database, paging (nice little auto paging function I wrote included), dynamic sorting, etc... Access 2000 sample database included.
Simple ASP codes showing "Survey" and online quizes
Have you ever had a serious crunch time for writing code and finishing the project on time? Then this may help you out a bit especially if you do a lot of work with data storage. The basis and structure of this code can also be used for many things. The main object we will be working with is a collection object,(namely the Request.Form collection). This can also be used with Arrays and Session variables and anything that can hold a collection of values. You will see how we go through each item in the collection and assign the data that that collection variable is holding to a database with fields matching the same name of the items in the collection. The For..Each..Next statement is a very powerful method that can save you a lot of time. Have fun with this and fill free to use it in any variation you see fit.
This is a task manager online. What this does is allow a group of people working on a rather large, or even simple project to put down tasks or ideas that are related to their project. I use this for my school assignments and the current web site that a group of my friends are currently working on. This Task manager has a whole lot of features that have not yet been implemented but you have the ability to add tasks, asign yourself to tasks and also edit tasks (if you are working on them). On the main screen you will see a list of all the tasks sorted by importance. If you wish to sort the list by a different order, just click one of the headings ('In Charge' 'Date') etc. You will also notice that according to the level of importance, the colour differs (red for level 1, yellow for level 2, green for level 3). This code teaches how to use SQL statements to access, update and insert data into a database. It teaches how to use the server() function in asp, and also teaches how to use cookies for login purposes. This code is fully commented, and if you would like any more information or wish to contact me, please email me at festie69@hotmail.com
You can use ADO GetRows to output and ADO recordset to an array. This is often useful in n-tier applications when you are moving data between tiers--or if you want to persist your data in another way. http://adozone.cnw.com/default.htm
Transactions are atomic operations that allow you to do multiple operations on a database as one operation. For example, if you were creating a banking application in which you deducted $100 from one account and added it to another account, you wouldn't want the operation to fail right in the middle, because the money would be 'lost'! The solution is to wrap the SQL in a transaction. If the operation is aborted in the middle (the pc gets shut off for example) the database will rollback the changes so that the initial account was never debited the $100. This will make you feel good, especially if its your bank account!
Since ASP is especially good at reading and writing to databases, let's start with a very simple database and scripts that we'll eventually build into a guestbook... Reprinted with permission from http://www.web-savant.com/users/kathi/asp
This is not real RDS but a simulation (Like Access's Not_In_List event). This functions gives the user the ability to 1) Add a new Value into a Database table and 2) update and select the value in the combobox WITHOUT REFRESHING the page from the server. I found this to be a life saver with large ASP pages with comboboxes on them that need to be dinamicaly filled. (You don't have to worry about the controls on the pages)
Compresses strings, most effective on bitmap files
This short and sweet function accepts a string containing text to be spell checked, checks the text for spelling using MS Word automation, and then returns the processed text as a string. The familiar MS Word spelling dialog will allow the user to perform actions such as selecting from suggested spellings, ignore, adding the word to a customized dictionary, etc.
This is a class module that performs regular expression searches in a string.
Want to sort 5,000 10-byte strings in about 1/10th of a second? This will do it (at least on my PII-233!). The insertion sort manages the same task in about 60 seconds (even when optimized it still took about 15 seconds on the same machine).
This routine was designed to act as a numbers-only mask for any TextBox Keypress event. Simply call it from any KeyPress event and feed it the KeyAscii return value.
This code duplicates the functionality of VB6's split function.
RECURSIVE DESCENT PARSER FOR NUMERIC EXPRESSIONS
Converts a name or word string to a four digit code following Soundex rules. Similar code is used by geniological groups and the US Census Bureau for looking up names by phonetic sound. For example, the name Darrell can be spelled many different ways. Regardles of how you spell it, (Daryl, Derrel, Darel, etc.) the Soundex code is always D640. Therefore, you assign a field in your database to the Soundex code and then query the database using the code, all instances of Darrell regarless of spelling will be returned. Refer to the code comment section for more information.
This is a recursive function that evaluates strings expressions. It supports multiple levels of parenthesis, algebraic evaluation of expressions (in this example exponentiation ^ has same level of multiplication and division), function calls, logical operators, string/date/numeric functions and expresion evaluation. This is the base for the creation of a scripting language.
Convert a string in EBCDIC format downloaded from an IBM mainframe to ASCII format.
Convert ASCII strings into EBCDIC code to upload into an IBM mainframe. This code may be used also as a basic encrypting method. Both ASCII to EBCDIC and EBCDIC to ASCII are included in this code.
format a text field into a $ currency field.