When writing to a file, is there an equivalent to the HTML non-break space character? Using “ “ works okay if there are other characters on the line, but when you want several blank lines in a table, if you use “ “ these blank lines are ignored. Code:
I have a text file being create with the FileSystemObject. It's being built based on results from a SQL query. All this is working fine, but so that I have a carriage return VBCRLF at the end of each row, I have an empty row at the end of my text file. How do I delete this last line?
I am creating a directory of suppliers.I have a form that collects data - business name, address1, address2, town, city, county, country, postcode. The data is stored in separate fields in an Access database. Another page is used to display the data, one field per line. However, if some of the fields are blank, I want to suppress the blank liens as at the moment I am getting:
asp (visual basic script) break long text lines into several lines.
This line of my guestbook (visual basic script) - response.write "message: " & Recordset ("message") & "<br><br>" displays access database field "message" in one line in web browser.
How do I break this text line into several lines? I know in asp.net there is datagrid. Is there something like datagrid in asp. Or perhaps this problem can be solved with htm?
I am working with an old line-feed printer text file. There are characters in the first position of each line that tell the printer what to do, i.e. print this line and advance paper, print and do not advance. when processing this text file for conversion to another text file I can't seem to work out the code for merging two lines. For example,
Type: Location: Quantity: + 123 London 45000
After processing the line should look like this: Type: 123 Location: London Quantity: 45000
I understand the concept but have no idea how to actually merge the two lines with code.
I have just registered as I have found this very useful saveas asp script but I want to modify it to read in a list of image url's from a text file and save them automatically Can anyone help me with the looping code to do this?
I have written a program where according to my query all the ouput is written to the text file. I want to add 3 lines to my text file which are needed so that it can be exported into outlook. Code:
We have an existing ASP app that is doing a very simple form submission to an Access db. So it opens a connection does a write and closes the connection.
The problem is that every other form submission is failing because of an "Unspecified Error" - according to our IIS web server log.
I have 2 things I'd like help with.
1) Writing to a log file: I'd like to write to a log file (either the web servers or a different one) from the server side code within the ASP app. So, once the code opens the DB connect I would like to know it was a success. Once it writes, I want to see the string its trying to put in, etc...
How would I do this in our ASP/IIS environment?
2) Catch errors:
If I'm opening a db connection to this access db, how can I be sure the connection is a success? does a value get returned that would indicate success/failure? if so how do I capture it? I'm speaking of some type of try-catch system.
is there another approach I should be taking to debug this problem?
im writing an asp code to extract data textfiles from the server using FSO, but when I run the script the file were save at the server drive(c not on my local drive
Error Type: Microsoft VBScript compilation (0x800A0401) Expected end of statement /Web2_Local/custquery.asp, line 180, column 21 Open "DOWNLOAD.FIL" For Binary Access Write As #1
filename = server.mappath(session("Directory") & "/Text/" & ExportFileName) Set ScriptObject = Server.CreateObject("Scripting.FileSystemObject") Set MyFile = ScriptObject.OpenTextFile(filename,2,true) Myfile.writeline exportString MyFile.Close
I'm putting tabs in the exportString the C way e.g. " " but they come out in the text file literally. How does one write a tab to a file with asp? (I don't want an HTML tab!)
I am a web developer that deals with reporting.I am trying to make a print application so i can choose a few reports and then print them.I tried to do the window.print() but i don't want the print dialog box to come up.I am going to try and print from the server using WSH.
is that i need to write what is on my page to a file.The pages are dynamically created and have many tables on them.Is there a way to write the page that i am displaying to a file while keeping the formating intact.
How can I, or is it possible to create a file with a .htm extention and have includes within that file? I am trying to do so through the following code but nothing is happening when I view the newly created file.
dim fs dim file
set fs = CreateObject("Scripting.FileSystemObject") set file = fs.CreateTextFile(path & newFileName & ".htm", true) file.WriteLine("<!-- #include file='header.htm'-->") file.Close
This creates the new file but when I try to view it, the header information is not included, so how can I accomplish this?
I have an asp page that is supposed to write text to a text file. I know how to write to a text file using Server.MapPath, but how to I write to a file that is on another server?
I have a form that submits an order and it sends it to the visa site and they get the info, but my problem is I get the info back from them with the amount of the order but I don't know what they purchased and the quantity.
What I want to do is on my page is also have it write to a text file on my server, but I am not sure how to do that? I have text fields and radio buttons on my site what I want it to do on submit is also write the info to a text file so I have the customers information as to what they purchased and the quantity.
Is there a way to have it submit to the CC company and write to a text file at the same time using asp code? do I need to write a loop of somekind?
I'm writing data from an access db to a text file then emailing the text file. Everything works fine but it needs to tab deliminated. Can some one post the code for a "tab"?
I would like to create a file on the hosting server (if it doesn't exist yet), then I would like to write some error information into it. Finnaly I would like to retreive that information later.
Can this be done? For example, in the line below. There may not always be a & objRS("ShippingAddress2") and I'm wondering if there is a way to use an if/then in there some how. If there is no data in that field then I need to pass over this part completely & objRS("ShippingAddress2") & "|"
I'l have several instances where I need to do this Code:
i found this piece of code from a site and it claims that you could create a text file into directory "c:test.txt" and writes the line Hello world in it. Code:
user wants to download XLS file(which would be genrated dynamically dedending on the user selection).
i dont want to create xls file on the server each time a user wants to download xls file. I want to create some sort of stream and write that stream to the new popup window by using response object?
I am trying to setup an ASP code to write a text file to the client side, not the server side, for the purpose where it will be email attachment.
The following code seems to only work on the server side and was wondering if there as an equivalent out there for the client side since I am trying to avoid potential interruptions on the server side:
Const TemporaryFolder = 2 Dim myFSO, WriteStuff, myAttachment, tfolder Set myFSO = CreateObject("Scripting.FileSystemObject") Set tfolder = myFSO.GetSpecialFolder(TemporaryFolder) if (right(tfolder,1) <> "") then tfolder = tfolder & "" end if myAttachment = tfolder & "test.txt" Set WriteStuff = myFSO.CreateTextFile(myAttachment, True)
I had to disable Script Blocking, afterwards it worked just fine. HTH Norton Script Blocking cause this problem. the 9o days testing product are finished earlier.
I need to be able to write results from a form picklist to a file. I know I can append the output at the end of the file but is there a way to add the output to a certain place in the file. i.e Code:
I've created a form for users to fill in, and I want to be able to write the details of each form to a text file. Each file is named username.txt (eg. JohnSmith.txt or MikeStiletti.txt)
However, when the code below is processed i get a "Path not found" error. Now these files are on a web server and i am trying to write to my C drive. It would be great if I could create these files on the same web server too by just removing the "C:Surveys" on the bolded line. Code: