Home | Advertising Info28 USERS CURRENTLY ONLINE   
PowerASP
   Site Search Contact Us Thursday, March 28, 2024  

  Active InfoActive Info  Display List of Info MembersMemberlist  Search The InfoSearch  HelpHelp
  RegisterRegister  LoginLogin
Classic ASP - Advanced
 PowerASP Code Help Area : Classic ASP - Advanced
Subject Info: Processing data/two servers: HELP! A d d  -  P o s tAdd P o s t
Author
Message << Prev Info | Next Info >>
jaobrien
Newbie
Newbie
Avatar

Joined: December/05/2005
Location: United States
Online Status: Offline
Info: 1
Added: December/05/2005 at 11:39am | IP Logged Quote jaobrien

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.

Back to Top View jaobrien's Profile Search for other info by jaobrien
 
asshammer
Newbie
Newbie


Joined: December/05/2005
Location: United Kingdom
Online Status: Offline
Info: 1
Added: December/05/2005 at 10:07pm | IP Logged Quote asshammer

No way to do this jaobrien,  the entire internet is all on one server… Yahoo and Google only have one server with the database, webpages, email, auctions etc on it. It’s impossible to have data on one machine and then access and use it on another, that would be distributed computing and its still science fiction.


OK seriously

you cant do this <!--#include file="http://www.server.com/process_mailer_engine.asp" -->

include stmts are processed ahead of the rest of the page. You cant call the page from a remote place with http, and your code is full of syntax problems..




__________________
ID10T
Back to Top View asshammer's Profile Search for other info by asshammer
 
cwilliams
Admin Group
Admin Group
Avatar

Joined: April/26/2004
Location: United States
Online Status: Offline
Info: 137
Added: December/05/2005 at 10:13pm | IP Logged Quote cwilliams

<!--#include file="http://www.server.com/process_mailer_engine.asp" -->

Jebus, that is one the most wacked code examples anyone has ever shown me. You can not do that. It's a Server Side Include.

Besides the fact that you can't call a server side include over http your server side include is within the <%%> brackets which I don't think can work. I have never tried it like that but generally you don't put them right in the middle of code delimiters like that.



__________________


Chris Williams
http://www.PowerASP.com
Back to Top View cwilliams's Profile Search for other info by cwilliams
 

If you wish to make a comment to this info you must first login
If you are not already registered you must first register

  A d d  -  P o s tAdd P o s t
Printable version Printable version

Info Jump
You cannot add new info in this area
You cannot add to info in this area
You cannot delete your info in this area
You cannot edit your info in this area
You cannot create polls in this area
You cannot vote in polls in this area

   Active Server Pages Rule The World
Contact Us  
All artwork, design & content contained in this site are Copyright © 1998 - 2024 PowerASP.com and Christopher J. Williams
Banner ads ,other site logos, etc are copyright of their respective companies.
STATS Unless otherwise noted - All Rights Reserved.

Active Server Pages ASP a directory of ASP tutorials applications scripts components and articles for the novice to professional developer. CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspprotect.com, www.cjwsoft.com,www.aspclassifieds.com,www.aspphotogallery.com