A String Has No Line Feeds Or Cariage Retunrs Or Spaces, Need To Insert A VbCrLf
When users fill out my text area field, there is a chance that there
will be no line feeds or cariage returns or spaces and just one really
long word.
THIS CAUSES A MAJOR PROBLEM! What I am trying to do is
force a vbCrLf if a string is long than 80 characters in a row. So if
a string is a total of 500 characters with no line feeds, spaces, or
returns, I want to force a vbCrLf every 80 characters so that is
doesn't overflow my preview text field on the next page.
Any suggestions on how the algorithm would be for this in VBscript
ASP?
View Replies
ADVERTISEMENT
My database has a field called Text that stores pre-formatted text in the form of:
String & vbcrlf
String & vbcrlf
String & vbcrlf
So there is a line of text, line break, line of text, etc and looks like:
First Line of text
Second Line of Text
Third Line of Text
. . . .
Last Line of Text
I've created a regular expression that searches for instances of line feeds followed by any character ....
View Replies
View Related
How to keep the spaces before the description line in the following code? Right now, it displays like "Net Income", but I like to have spaces before the words like " Net Income". The database value is " Net Income".
<td align="right"><Font class=content4><%=ars.Fields("LINES")%></td> ...
View Replies
View Related
I have a View button that shows a database record of entries. At the end it has a delete link for each entry. When u click it, it passes the Address(like a house address) to a script that searchs the DB for the matching address.
The only problem is most address have spaces. I read somewhere about double quotes, or using single quotes or some combination, I don't remember.
View Replies
View Related
I'm executing a stored procedure where I have the values hard-coded. I need to replace the hard-coded values with variables.Here is the hard-coded line:
Query_Allo_Amt = "exec app_get_alloc_ABR 'STRATEGY', 'AUS', 2005"
I need to replace STRATEGY with cmdAlloAmts__alloc_type, AUS with cmdAlloAmts__ddo, and 2005 with cmdAlloAmts__ay. I've made several attempts at replacing the hard-coded values with the variables and come up with different error messages. How can I replace the hard-coded values with variables in the above line?
View Replies
View Related
If I have a string and it contrins the following:
Hello world
how are you today?
What script will change it so the string contains?..
Hello world <br> how are you today?
View Replies
View Related
Can anyone please tell me how can i do the pop up message in ASP without blank the background of the page when the pop up message pop up?
Besides that, how can i split the string in one line into two line by using asp?
for example if i wan to split the
"science computer"
into
"science"
"computer"
View Replies
View Related
How can I display the first 20 characters of a long string?How can I insert some character inside of the string on every 5th character?
View Replies
View Related
I have a form that collects the date and time of an event.
I create a string to hold all of the data in the correct format for MySQL and it (the string) looks like this...
2007-03-03 17:30:00
I am then using CDate to convert the string to a DateTime type.
and since I am in the US it gets converted like this...
3/3/2007 5:30:00 PM
per my regional system settings...
I grabbed this code from the forums here which I have used before...
Function ISODate( dt )
If Not IsDate( dt ) Then
ISODate = "NULL"
Else
dt = CDate( dt ) ' safety
ISODate = "'" & Year(dt) & "-" & Month(t) & "-" & Day(dt) & "'"
End If
End Function
ISODate = "'" & Year(dt) & "-" & Right("0" & Month(t),2) & "-" & Right("0" & Day(dt),2) & "'"
My question is How do I modify it to add the time to the ISODate function and then include it in my insert statement correctly?
View Replies
View Related
I have an asp page with a form, which has a lot of fields 30 to 40 .Is there an easier way to loop through all the fields submitted to the insert page or is the only way to do it using the standard, request.form for each field and then INSERT INTO Reports (ReportID, ReceivedDa very lengthy for this amount of fields. Perhaps there is a way of looping through some sort of collection ?
View Replies
View Related
I have a form that collects the date and time of an event. I create a string to hold all of the data in the correct format for MySQL and it (the string) looks like this...
2007-03-03 17:30:00
I am then using CDate to convert the string to a DateTime type.
and since I am in the US it gets converted like this...
3/3/2007 5:30:00 PM
per my regional system settings...
I grabbed this code from the forums here which I have used before... Code:
View Replies
View Related
I'm using conn as ADODB.Connection object. when I write:
conn.execute "insert into table (binarydata) values ('" & binarydatastringvariable & "')"
it returns the error:
Unclosed quotation mark before the character string '(here is some string given)'.
How can I insert binary data to a ms sql server 2000 table without using adodb.recordset?
View Replies
View Related
I am having terrible time in converting a string to a datetime field in my asp page. I am keep on getting error on the following stateement. What would be the correct syntax on converting string to datetime for inserting into a sql table?? I did write the add_str out on the browser, everything looks correct...
Error message:
[Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting datetime from character string. Code:
View Replies
View Related
I have the belwo code which i mean to do an multiple checkbox insert. I have managed to get it so i puts all the checkbox values into a string seperated by a comma, and it insert into a database, however just not how i need it to.
Curently inserst like :-
View Replies
View Related
how to use vbCrLf or give me some direction on where to look for some information?
View Replies
View Related
whats the difference between Chr(13) and vbCrLf
which one to use where?
View Replies
View Related
i observed many asp codes with vbCRLF like:
Response.write "</select></td>" & vbCRLF
what for vbCRLF is used?
View Replies
View Related
Im still working on some <%@ LANGUAGE=JScript %> code ;).What is the same command as VbCrLf in JScript?I just want my HTML to jump one line down.
View Replies
View Related
Is there something that I need on my computer in order for vbCrLf to work? Anytime I include that in my ASP code it never creates a line break... it just ignores it. I have to change it to "<br>" Am I doing something wrong?
View Replies
View Related
I am in the process of creating a blogging community site. What I want to do is use their Blog RSS feeds to create a recently posted list with say the last 20 feeds. I have access to both atom and RSS.xml files.
The trouble is I would not know where to start. We are anticipating a community of about 50 bloggers all using Blogger. We are wanting to post the latest entry at the top of the list moving down as new ones get added.
View Replies
View Related
I am trying to create a newsfeed on my website. I used the following code on my website which I found somewhere. I then placed the call to this code in my web document. It does not appear to work. Code:
View Replies
View Related
I want to pull in some RSS news feed from several news sources but I'm not too sure how to use the files that are retrieved. Has anyone got any good tutorials or tips for it?
Is it more efficient to store the news feed in a file on my local server rather than calling it everytime my local page is requested?
Some general tips on this would be really helpful - I'm guessing the XML parser would be required at some stage...
View Replies
View Related
I am looking for a way to use.asp to display simple.asp rss feeds.I don't want to load the xml rss pages from the server as it doesn't have a proxy configured,instead I want the .rss to load from the client.Does anyone have any examples of this?
View Replies
View Related
I have used thecode which is below to get x characters on to display
<%= LEFT(rsName.Fields.Item("columnname").Value,50)%>
It works fine but when I use this same code to get x characters plus display it using VBCRLF, with the <br> with writing the code :
<%=Replace LEFT
(Recordset1.Fields.Item("Detail").Value,VbCrLf,"<br><br>",50)%>
it gives me error so please can you tell me how can i trim the characaters and at the same time use VBCRLF. why does this above code with LEFT + vbCrLF doesn't work.
View Replies
View Related
I have written a RSS News Fees application for my site, by I want to limit the number of news items to only 5 instead of the 10 that Reuters sends. Here is the main code:
View Replies
View Related
I want to get the RSS feeds from news.bbc.co.uk and use them on my website
http://news.bbc.co.uk/rss/newsonlin...page/rss091.xml
is an example of the data.
what do people think is the best way to incorporate these into my site?Do I read the XML data from the BBC site or download the file every 20mins or so and then read the file locally.also can anyone point me to a resource that can tell me how to write the XML
data to the page?
View Replies
View Related
I have made an ASP page that dynamically creates an XML page from articles stored in an Access Database. It works great and i was well pleased with myself.I was then sitting back admiring my own work when i suddenly thought.The page ends in .asp and not .xml.So i downloaded some free feed readers and news readers and they all found the feed with no problem and i thought i was going to be alright then it clicked - What if the "person" who wants to add my feed to their own site for example, has their site written in PHP?
I wrote a little PHP script that dynamically inserts feeds and sure enough, it will not accept a feed URL ending in .asp. It's (of course) fine if it ends in .xml So, (sorry for going on) Im wondering on your thoughts about this and what you would do? How LESS efective do you think an XML feed ending in .asp is?
View Replies
View Related
i want to get the rss newsfeed from the other news site and want display on my site in the html format. can any tell me that how i can do it using asp.
View Replies
View Related
I'm looking to build an ASP script that can pull in the XML for a podcast feed and display important information (podcast title, description, link, etc). For some reason, I have been unsuccessful in getting this to work, despite a number of tries.
Does anyone have experience doing this or any examples that they can refer me to? For some reason my scripts have been unable to read the enclosure tag, and to be honest, I don't have advanced knowledge of ASP - XML interaction to really know why.
View Replies
View Related
I'm trying to make an ASP page with VS .NET 03 using VB as the language and I want the page to display an Rss News Feed as page content form another RSS News Feed on a web page served by another one of my IIS srevers, I don't know how to do this it sounds simple enuf but were do I start is it a simple one line of code deal or it it complex to do I havent really played around with Rss news Feeds much give me some feed back .
View Replies
View Related
I had created a macro to read data from an excel sheet and write the values to a text file. I had used "ActiveSheet.Range("GB" & k).Value" command to read the values from the excel.some cells in the excel sheet is having two lines value and four lines data, the text file is generating that value in a single line. (Ex. the cell value in address column is in four lines and should display in four lines in the text file generated from the macro)
Can i do something in the excel sheet or in vb script to read the address value line by line and write line by line in text file?
View Replies
View Related
An important thing to mention here is that when this data goes into my database table i'm using the UPDATE function to modify pre-existing records in the database.
The form that contains my textarea also populates the textarea with the current data from the database so when I submit data, when the page refreshes I should see, in the textarea, the data that I just submitted.
Another things worth mentioning is that when I UPDATE this information in the database, the content from the textarea goes through a instances of the replace() function. There is one in particular that I need but is causing problems:
strTextInput = Replace(strTextInput,chr(13) & chr(10),"<br />")
when the data from the textarea contains a line break I want that to become a break tag in the database. This works well EXCEPT for a line break that seems to always exist at the end of the text in the textarea when I submit my form to be processed. This trailing line break exists regardless of any attempts. If I have: Code:
View Replies
View Related
I have an encrypted .txt file created by asp. Its formatted with lines etc. Title followed by description underneath. I need to read this into ASP now, and parse it line by line. On each line read, run the function to unencrpt and add line to a new file.
Its the line by line Im having trouble with. If i do the full textstream no formatting takes place coz im adding the fulltextstream all in one addline call. How can I loop through lines ?
View Replies
View Related