I have an application form that when filled out is being written to a singular HTML file. I want to convert it to generate a unique file name each time a user fills it out.
Secondarily, I want to be able to attach the unique file to the email that is sent to us when it is submitted.
Here are the current snippets of code:
set ObjFS = server.createobject("Scripting.FileSystemObject")
set objTheFile = objFS.OpenTextFile("e:credapp2.html",2,-1)
objTheFile.WriteLine(FileToWrite)
objTheFile.Close
in Database i have table 'timetable' it contain one field 'lect_id' which is primary key of that table. i want to generate unique ID. How can i do that.
I have a script that will compact an Access MDB and a copy to a new folder. I would it to give each export a unique file name. I can do this with an absolute file reference but I am struggling to create one using 'Server.MapPath'.
currently, i export data from ASP to Excel. but i want to change it to RTF. i have looked at microsoft website and tried whay i have studied but failed to make it. at microsoft website, the table is created using rtf script but in my case, i just want to create it using html script.
and then, when user click PRINT button, i want my system shows the detail contents of rtf file and then open the Print window later. so user does not need to click File->Print and so on. is there any example script i can study?
i get data with ado i need to get a xml string from the recordset how can i get it without having to persist the recordset in a (xml) text file is there a simple way ?
Is it possible in a global.asa file (or some other way) to have an xml file generated by an asp script and saved to the server some how?
<% Dim xmlDoc, rootEl, child1, child2, p'Create an XML document Set xmlDoc = Server.CreateObject("Microsoft.XMLDOM")'Create a root element and append it to the document Set rootEl = xmlDoc.createElement("root") xmlDoc.appendChild rootEl'Create and append child elements Set child1 = xmlDoc.createElement("child1") Set child2 = xmlDoc.createElement("child2") rootEl.appendChild child1 rootEl.appendChild child2'Add an XML processing instruction 'and insert it before the root element Set p=xmlDoc.createProcessingInstruction("xml","version='1.0'") xmlDoc.insertBefore p,xmlDoc.childNodes(0)'Save the XML file to the c directory xmlDoc.Save "c: est.xml" %>
THis seems to be what i am after but when I try to modify the xmlDoc.Save line to either "/images/listings/test.xml" or imageslistings est.xml" and it comes back saying it can't find the path. If I just leave "text.xml" it comes back saying permission denied. If I can solve this path issue so as to be able to save the file to a directory I think I will have it solved.
With response.contenttype = "application/vnd.ms-excel", I can easily export my data to Excel which is embeded and shown within a browser. If I'm going to save the Excel file through ASP programming, which method can I use? I need to save the data to Excel file with dynamic name (the file name should contain key values and appended with system datetime).
how to create (generate) .html file by using asp. I am not sure if this possibility even exists... if not, is there any other way I could generate .html files? The thing is that I have to retrieve info from database and the generate .html file.
I know I could have it as .asp, but this woudl my index page and I would like to use it for search engine, which are not very happy with other extensions than .html.
Is it possible to get information from a database and generate it to unicode text files using ASP? Is there any product/COM out there that can do this? If not, is there any other solutions? It doesn't have to be ASP, but it would be nice.
On each site there is a global.asa file that ties into an Access database. The fields from the Access database instantiate the values of session variables used in the site. I am trying to do away with the need for a database and was wondering if when I set up a site I also set the .asa file for that site.
Then if a shop wants to change something like an address, phone, number, directions, etc., they would go a toolbox area of the site and there would be a form whose field values would be populated by the session variables from the global.asa file.
When the form was submitted I was thinking I could somehow use asp to write a new global.asa file and store it in the server. Is this feasible? Also, what would this mean insofar as permissions on the root directory of the site? I'd imagine they'd have to have write permissions no? Code:
I'm looking fo a solution to generate automaticaly a PDF file.
My aim is to use a template define by a user and to insert dynamicly datas form SQL server in this document.
Can you tell me if it exist PDF template like .dot for word ? If such file exist is it possible to generate list of information like aacount report with datas coming for Database like Sql server.
i'm building an ecommerce website and I want to create a unique orderID for each new order. My problem is that I don't want to have a random number but a number where each orderid is one higher then the last order like for example 4850323, 4850324, 4850325....
I tried to do this by using an application variable where 1 is added after every order but this doesn't garantee a unique number because if IIS is reset it also resets the application variable.
I've a databse of product in which I've unique ProductCode plus a ID that increments by 1 (AutoNumber). both the code and ID are unique and there will be no duplicate but is it worth having both in the databse?
I mean, can I not just use the productCode and forget about the ID? does this makes any difference? as far as I can see I'll have no problem in using the ProductCode. how you'd do it.
I have a list from a database which I have made into a dropdown box, with each option as one line from the list. At the moment I have several repeat values which I do not want. I can set up a series of nested if statements and loops to remove the duplicate values but I would expect there to be a function which does this much more easily.My question is:
Is there an easy way of only displaying unique values from a database using ASP and SQL.
This is about a simple form validation in asp using javascript.there is one field called invoice_number which requires an unique invoice number as input. Whenever user inputs duplicate values message should pop up as warning on submit of the form. A sql fetches all the invoice nos. from database into an array using getrows.how do i use the result of getrows in javascript to perform client side validation
I am trying to find a best algorithm to generate unque id(alphanumeric less than 10 character long - not GUID) for entering orders in orders table for an e-commerce site.
I need to implement a email confirmation ASAP, but I need a way to create a unique ID. Can I just use the SessionID? People will click a link in their email, (if it exists), and my site will validate it. ASP.NET has GUIDs, but ASP doesn't. I'm wondering if a SessionID will just do it?
Each id is unique to customer. I have a table with over 100 rows of the above.I need a way to pull that last three occurances of error number 0 for each customer? I was trying to use a subselect but i was having trouble.
I'm trying to obtain the IP of the hosts connected to my webserver.
Code:
<% on error resume next
'trying to obtain host IP ip = request.servervariables("remote_addr") response.write "IP addr: " & ip & " --- " ip = request.servervariables("remote_host") response.write "IP host: " & ip %>
If I use the above script, it shows me the IP of my ISP webproxy, not mine.
I have registered the domain with godaddy and mapped the dnc to my server (Windows 2000)
When i browse that site using that www.abc.com, in one of the pages i found that the session value is lost. This happens only in some machines not same with all. Most of the machines works that site properly. But not the same in some machines. All machines has configured same.
Is it possible to create a unique visitors hit counter in ASP? I'm struggling to find any tutorials on the net. I found a few that can do a unique visitors on a daily basis but I just need a straight forward unique visitors in general.
Very ill today so unable to concentrate and need some help with some fairly simple stuff... Below is standard code on my page which is recieving variables from Flash and imputting them into a database. What i need this page to do is to and your help doing it is: 1. Check if the email address exists in the dbase? 2. If it exists then to update the field 'High_score' 3. If it doesnt exists then to create a new record and input as the code below does.
I have found a tutorial to create a hit counter for my webpage which runs off of a database it is all wonderful and everything BUT, whenever I am working on the site and refreshing a thousand times to see what everything looks like, it is counting me too.
Is there any way to code your own counter that counts only unique visitors? I would use a free one, but of course I don't want any links or images on the site, I want to be the only one that can see the stats.
I am trying to create a folder dynamically for an individual user to upload to on my site. However having successfully created a folder dynamically, I cant create a folder by the current users username.
The '<%=username.Fields.Item.Value%>' part was done by dreamweaver and believe that to be the problem.
I'm writing an ASP application in VBscript that will take an exported Goldmine contact record and import it into our on-line system.
The problem is that I want to export the Goldmine unique ID so I can re-import data back into it and make sure it goes to the right account. However, the account numbers in Goldmine are very interesting, here are a few examples:
As you can see, there is a wide assortment of characters in an account number. The problem is that when I try to import it into the online system it breaks ASP because of these characters. I've tried adding slashes before special characters, but then trying to remove them is impossible because the same slashes could be used in the actual account number.
i'm about to write a shopping cart application and need to know the best way to assign a unique id to each order.previously i used the sessionid which i've since found out isn't unique.can someone please advise me as to the most reliable way to assign a unique id to a transaction.i'm using classic asp and an access database. i'd rather not use the session object due to issues with a previous shopping cart application.