At the risk of sounding a bit vague, I need to write a component that can be accessed by existing web applications. Most of these applications are powered by ASP, but I do need to support the occasional JSP or PHP app, if not only for the reason that I have a soft spot for PHP. What language would you all recommend for this component?
Java would seem to be the natural choice here, but I'd like to get everyone's input. Is it even possible to write an ASP .NET/C# component that can communicate with PHP (or vice-versa, say, a PHP class that can tie into an ASP .NET application)? I suspect that it is, given the flexibility of software nowadays, but how hard is it to set something like that up?
Just curious if anyone has faced a similar problem and if so, how they went about coding their solution. I apologize for the generalness of my question... I'm still kind of in the process of coming to grips of the nature of the problem myself, but I'll attempt to provide whatever clarification you think is necessary.
Ok, for my company, we have two current webpages, one for general company info and one specific to a product that we market. On the 2nd page, there is a form that allows users to request a consultation from the company. When it is sent, the information is stored in an Access DB for tracking purposes.
Now, I have been requested to put this same form on the general company website. All works fine, but I can't save to the db that is stroing the info once it is submitted. Boith sites are hosted by the smae company, but they do not have (as far as I know), a shared repository for files where I could put the db.
Does anyone have any suggestions as to how I can get around this issue? What I want to do is to have the form on both sites and have the submitted data saved into the one database.
I'm not getting error messages on this one so I don't know where to start looking. I type in my data in my form and this page should check it, add it then set a flag. Code:
I have to perform a database query and write the results to an XML file.
I also need to form this XML file with a DTD file.
I'd like to hear some opinions on the best way to do this.
I figured out how to write out just raw XML using adPersistXML. But that doesn't really help as the XML needs to conform to the DTD.
I also found a way to write out the XML file line by line using .createNode and .appendChild...but that would take forever as the database query returns 72 columns.
I have the following code as a part of authenticating a system. If Rs.eof Then Session("Authenticated") = 0 Response.Write "Sorry, your userid or password did not match" Response.Write "<BR>" Response.Write "or you have not registered yet. Please register" Response.Redirect("login.asp") Else Session("Authenticated") = 1 Response.Redirect ("Welcome.asp") End If In the first if statement, I would like to display the above messages before forcing the login.asp page to display. Is is possible to do both message and contents of login.asp in the same page? Thanks
i am having problems figuring out the syntax used when writing information to a database thru a dropdown. i have a dropdown w/ all the months listed and i need this recorded into a database where i have already set up a column named "month". right now all i have is html that says:
Code:
<select name="month"> <option value="January">January</option> <option value="March">March</option> <option value="April">April</option> ....... and so on....... </select>
I have an asp page that queries a database and displays a report. There is a button on this page that I would like to dump the report into Excel. The code behind the button:
var xl = window.open("/reportexport.asp", "_blank");
and a new window is displayed with excel. Now the problem is how do I get the report html into this new window? xl.document.write(window.document.body.innerHTML); is obviously not the way since it doesn't work.
reportexport.asp contains only two lines: Response.ContentType = "application/vnd.ms-excel" Response.AddHeader "Content-Disposition", "filename=report.xls;"
I've been having problem writing a cookie. Everything goes ok but when I supply the .Path property to "/" It just write the cookie when there is no cookie present, but when I try to update the cookie (or overwrite the cookie) it doesnt change it.My requirement to supply the path to "/" because ASP.NET reads it. If I write the cookie without supplying the path, the ASP.NET pages are unable to read the cookie.
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?
I have been playing with an idea that generates ASP files using an asp document and the file system object, so far it is doing great except one thing, when I have a chunk of text and I need to include an asp bracket ("<%" or "%>") regardless of being within the "quotation" marks the active asp document assumes it is a part of its own code and the script errors.
To get around this currently I am writing brackets like this "[<]" or "[>]" and then swapping them out of the generated ASP page using dreamweaver after creation.
The question is: Does anyone know how to represent asp brackets within a string being processed using asp??? Code:
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
writing cookies seems to be a no brainer, but for some reason, my temporary internet folder does not contain any of the cookies when run the pages. i am starting to think that it may be IIS 4.0. anyhow, these are the cookies that i writing:
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.
I'm writing a company intranet site,and on the home page,I'd like there to be links to some of the software that the employees frequently use on their own computer.This will be the inducement to get them to use the intranet home page as their default home page, and visit it frequently.
I want to write a query which basically invoves 2 tables: Status and Code.I want to insert the content of one of the field of the table code into one of the fields of the table status.Something like this:
INSERT INTO Status ([Instructions] values ("Select doc from Code where Id="&Request.Querystring("ID")&" ")
I wanted to know the query how i could insert data from one table to one of the fields in other table?
Totalperdayleads contains 2 & totalleads contains 11. now inst_register table contains per_day_download,download_Date fields in per_Day_downlaod is initially 0 & it will be go max upto Totalperdayleads i.e.2 for one day then i have to compare date with download_Date from inst_register & again for next day 2 Totalperdayleads this way i have to allocate totalleads in per_day_downlaod field of inst_register.
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'm using the folowing code to search through a text file using FSO and only response.write the lines that start with "Flow": Code:
Do While f.AtEndOfStream = False If left(f.Readline,4) = "Flow" Then response.write f.ReadLine End if Loop
after I evaluate a line with the If statement it moves to the next line so I'm always writing the line after the one I want. How do I get away from 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 cant seem to right to my asp database... This is my code. Code:
set conn=Server.CreateObject("ADODB.Connection") conn.Provider="Microsoft.Jet.OLEDB.4.0" conn.Open Server.MapPath("/db") & "/db.mdb" ors = Server.CreateObject("ADODB.recordset") sql = "SLECT * FROM members" ors.open sql,conn,adOpenDynamic,adLockOptimistic,adCmdText This is the error message I get...
Object doesn't support this property or method: 'ors.Open'
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 will be needing to write an SQL SELECT statement whicontains wild cards in the WhERE part of it. ie I need to find stock items with wildcards eg I want to find CC??AB where ? are wild cards letters similarly the code could be CC*BR8S* What would the SQL WHERE Statement look like .
I do not have a programming background, but as a web site administrator, I've learned a little ASP. I currently have a form that writes to a DB table. I wrote a report to pull the info and thought all was peachy.
Now they are wanting a new form which automatically adds a row as you need it. Then, they want this form to write to 3 SQL tables with a many to many relationship. As a non-programmer, what is the best way to do this? I've looked as ASP.Net, but it seems very complicated.
I'm running an ASP application that takes information from an Access Database then writes the contents of a set of tables to a directory. The problem is if the application tries to write to the directory it freezes.
Well, not freezes but just sits there doing nothing with the status bar slowly increasing until it times out. After this happens, IIS needs to be restarted to serve web pages again. I am at my wits end, as the code was working on another computer. I have set the permissions for the guest internet account to full, as well as on the DB.