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?
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".
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.
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:
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?
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
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 ?
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:
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?
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:
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.
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?
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.
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:
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...
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?
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.
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:
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?
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?
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.
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.
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 .
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?
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:
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:
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 ?