Link to home
Start Free TrialLog in
Avatar of dory550 lambert
dory550 lambertFlag for United States of America

asked on

Windows plat. ASP, converting order to a textfile....

Hi Guys
I have a website running on classic ASP/VbScript  with MS Access 2003
I have a query which represent an order that was just place by a customer.
What are the easiest steps I can take to create a formatted text file that contains the order details for emailing to the customer.
Thank you
Dory
Avatar of puppydogbuddy
puppydogbuddy

Avatar of Scott McDaniel (EE MVE )
I'd be very surprised if you could use SendObject from a web server ... I doubt Office/Acces is even installed on it.

Only way I know of to write to a textfile from ASP is through the FileSystemObject, and (again) I'd be surprised if that were enabled on a webserver. If so, then check this site: http://www.asp101.com/samples/textfile.asp

As far as sending mail, do you know what OS the server is running? If it's a Microsoft Server, you can use CDONTS: http://www.webwizguide.info/asp/tutorials/email_using_cdonts_tutorial.asp

Avatar of dory550 lambert

ASKER


To LSMConsulting
FileSystemObject is enabled on a windows plat web-server
I am using it now without a problem.

I was wondering if there are any tools that can bridge between a report generator and FileSystemObject
thus avoiding the continuous drugedry of writing codes over & over again.

I am familiar with  ASP emailing!
sendobject also inserts a blank line each page break I am also not sure it works from a web server

Thanks
Dory
dory550,

  note from these links using SendObject indicate that it works from a web server:

SendObject will send your email by what ever default email program your computer uses.  If you are not sure what your default program is: Goto: Control Panel> Internet Options> Programs tab and see what is listed for your email program.

     http://www.tek-tips.com/faqs.cfm?fid=4509

     http://forums.techguy.org/web-email/39163-help-sendobject-command-help.html

      http://www.thescripts.com/forum/thread189499.html
     

   
PS: the code supplied by Gus Kernot (in the last link above) for sending invoices appears to mirror what you want to accomplish with customer orders.

TO puppydogbuddy
Please enlighten me
Can you please include your solution in a small asp/vbscript script that would work in a shared hosting environment  using MS access 2003
That script should be a small webpage sample with an asp extention using docmd.sendobject

Thank you
Dory

Sorry PDB, not trying to be argumentative, but I don't see where those links indicate that SendObject will work on a web server. DoCmd is an Access specific command, and is available only from within the Access environment. I suppose you could automate Access through ASP, something like this:

Dim obj

Set obj = Server.CreateObject("Access.Application")
obj.DoCmd.SendObject "blah blah"

Of course, this assumes that Access is installed on the server, that the server allows Access to send email, and that you have the necessary permissions to automate Access in that manner (and I seriously doubt you would, unless you own the server). Either way, it would most definitely not be the preferred way to send email from a web server, and certainly not from within an ASP application.


To LSMConsulting

Those were my thoghts precisely
But I couldn't be as assertive as you were because my knowledge does not extend as far as an Expert's knowledge.
Sooooo
I always give others the benefit of the doubt

"The path to Knowledge is littered with mistakes"
Hey. that is not a bad quote. Maybe I should coin it...
Thanks
Dory
I just got back on-line. Everyone makes mistakes, including you.  If i am wrong, i was mislead by the following link on ASP Free.

http://forums.aspfree.com/microsoft-access-help-18/ms-access-email-report-19094.html

To puppydogbuddy
Did not mean to offend you or anyone
Sure I make mistakes.
Actually I spent about an hour on ASPfree reading some interesting  threads which I would have done otherwise.
Thank you for your input
Dory
Dory,
No probs.  So, does the sendObject method work, or is the link incorrect??

PDB
PDB
As far as I know It does not work in a web-Server environment.
Dory
Perhaps try this pathetic kluge:

Since the order is processed on the server, before returning to the client prepare an HTML file containing the order details and save it to a public folder on the server. Return the fully-qualified path to the client as a link with MAILTO as the href, and allow the user to e-mail the report to himself?

Not very elegant, certainly, but without specifics about your web server, it's the best I can do.
ASKER CERTIFIED SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
So ... why the C grade?