![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Under Construction! |
||||||||
Textarea tag problems... The textarea tag puts a carriage return <CR> in at the end of your text by default. This can cause a problem in your code later on. To solve this, use the StripCR("#variable.txt#") function to remove the carriage returns from your variable. The Evaluate function... Let's say I had a form on one page which had a text box defined as follows: <input type=text size=10 name="Text#variable_name#"> where the #variable_name# is defined by an SQL statement. Now, in the following page, how are you going to use that field if you don't know the name of it? The answer is the Evaluate() function. what you would do in this case is runt he same SQL statement on the next page and create a variable as follows: <cfset myvar= Evaluate("Text#variable_name#")> and this will set the myvar variable to the same value of the text input box. Appending variables... A variable can have data appended to it by using the following example: <cfset foo = foo & "This is a test"> This will add "This is a test" after whatever foo is set to. Outputting html tags... If you have a variable with HTML tags in it, which you do not want to have processed, then use the <XMP> tags around the data, you want to output and any HTML tags within will not be processed. Using text files... In my application, I had original stored the call details in the SQL server, but then I ran into problems if the data was over 255 characters and the logs themselves were starting to be quite large. To solve this, I put all the descriptions in a text file, which I can then call in using the CFFILE tag. This tag is useful when creating log files or storing anything that needs allot of space and may expand. Excel Statements... The following is an example of how to do SQL statements with Excel 5.0 files: <cfquery name="aquery" datasource="excel"> <cfquery name="aquery" datasource="excel"> These statements select and insert into the i:\sats.xls workbook file and on the Ownership page of the workbook. UPDATE... There has been many questions about the Excel driver and SQL statements. Here's how I make it work: I use the Microsoft Excel 3.51.102900 ODBC Driver. All the latest drivers are installed I do understand though that here is many questions about what statements actually work. I guess I only know what I have tried works, so I can not help you there. If you look in the forums, there is allot of discussion about what works or doesn't. Here is a Microsoft Knowledge Base article that explains the limitation with the 3.x excel driver regarding writes and updates to an excel spreadsheet (Thanks V. Delgado.): Too bad that's all the info I can give you for now. Continue to Next Page Previous Page |
||||||||
![]() |
||||||||
|