Multiple People Writing To XML File At The Same Time
I have a standard ASP page that appends to an xml page.
Currently if there is more than one person attempting to append to the same XML file at a time. One user will have the ability to append, and the other user will append nothing.
Is there a way to avoid this from happening? For example. Lets say the user opens up a cached version of the page then append to the actual file. For some reason I remember reading about something like that, but just can't recall.
I am try to insert data from a form in to an access db When a store is added this asp page writes to two tables in the database But the product data need to be add to 5 individual row but I get this Error Identity cannot be determined for newly inserted rows.
I think I am writing The data into the same row every time. What can I do to make sure I a creating a new row every time I update rsproduct Code:
I thought when I discovered the power of session.sessionID I was onto a winner... but in the last month or so have been finding more and more of it's shortfalls (all down to whatever specific users have running on their machines)
Passing data through querystrings isn't ideal as people might go and type a url in to move around.
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.
im making a simple site where people can add comments into a shoutbox. only ive had experience of people adding in html tags and javascript to redirect people away from my site and display images etc which im not interested in.
how do i stop this from happening? is there a way to intercept the form contents and kick out the code leaving plain text? or changing the code so it displays the real code using < and > ?
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:
I am writing one line and for a reason I ignore it adds a line which is screwing up a few things.
<% Set fso = CreateObject("Scripting.FileSystemObject") dim sLine sArchivo="switch.txt" path = Server.MapPath("../Flash") sFile = path & "" & sArchivo
if fso.FileExists(sFile) then fso.DeleteFile(sFile) end if Set a = fso.CreateTextFile(sFile, True) if request("radiobutton") = 1 then sLine = "&ver=si" else sLine = "&ver=no" end if
I'm writing a asp file dynamically. The code works 70% or the time. It pulls info from access and creates the file -- for some reason though some characters (and I see nothing different about these) causes the following error on the line objfile.writeline