Added: December/05/2005 at 11:39am | IP Logged
|
|
|
Ok, I'm so hoping there's an ASP solution for this one. I have data from an Oracle database table on Server 1. I need to be able to process that data through a loop, and process it on a completely different server to process e-mails for that data. I tried doing an "include", but it doesn't work. Is there a possible way to process data from one server's database by another server's web page? Can I connect to it over the web with a URL from one server?
Just to see what I was trying to do, here was the code on Server 1 (the server where the primary data is) ... I'm trying to loop through the data and call the procedure on server 2 that actually sends e-mails out. (And don't ask why I don't just use e-mailing services through ASP on Server 1 ... spam filters and so much is preventing me from sending e-mails from there) ...
Anyway, here is the file on Server 1:
<% Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open &&&DATABASE LOGIN&&& sqlmail="SELECT * FROM emails WHERE send_status = 'N'" set rsmail=conn.execute(sqlmail) Do while not rsmail.eof ThisId=rsmail("email_id") SendTo=rsmail("email_to") SendFrom=rsmail("email_from") Subject=rsmail("email_subject") TheEmail=rsmail("email_body") <!--#include file="http://www.server.com/process_mailer_engine.asp" --> sqlupdate="UPDATE emails SET send_status = 'Y', send_date = sysdate WHERE email_id = " & ThisId set rsupdate=conn.execute(sqlupdate) rsmail.MoveNext Loop %> The include file on the other server (in this case, dummied as www.server.com) simply calls the mailer engine and passes the variables through to send mail ... I'm basically trying to use the variables from the Server 1 page on the Server 2 page.
I have a feeling I can do something like this, but I'm going about it the wrong way. Or if I can have a page on Server 2 that can call the database on Server 1 somehow ... any help would be so greatly appreciated, I'm up against a deadline on this.
|