Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 1st, 2005, 05:42 PM
Authorized User
 
Join Date: Jun 2003
Location: , , .
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Default writing to client machine - PLEASE HELP

ok .. I need help (once more)
I create a report in the following script fed by an Access Database.
My goal is to give the client the option to save this report as an xml file locally so it can update the clients Database (via import)
how do i write from the server to the clients harddrive? Is there a way to write directly to the clients harddrive? or do i create a file for download on the server?

Toran



<%option explicit%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
    <title>Client Report</title>

    <%
    dim objCommand, objRS
        Set objCommand = Server.CreateObject("ADODB.Command")
        objCommand.ActiveConnection = strConn
        objCommand.CommandText = "Select FirstName, Name, City, Sales.SalesID, SalesDate, SalesTime, Client.ClientID "
        objCommand.CommandText = objCommand.CommandText + "FROM Client, Sales, SalesLine "
        objCommand.CommandText = objCommand.CommandText + "WHERE Client.ClientID= Sales.ClientID AND Sales.SalesID= SalesLine.SalesID "
        'executing and resetting to Nothing
        objCommand.CommandType = adCmdText
        Set objRS = objCommand.Execute
        Set objCommand = Nothing
    %>
</head>

<body>
Sales Reports:
<%

response.write "<table border ='1'>"
response.write "<tr><th colspan='4'>Clients</th></tr>"
if not (objRS.eof) then

    objRS.moveFirst
    while not objRS.eof

    response.write "<tr><td>"&objRS("ClientID")&"</td><td>"&objRS("FirstName")&"</td><td>"&objRS("Name")&"</td><td>"&objRS("City")&"</td>"
    response.write "<td>"&objRS("SalesID")&"</td><td>"&objRS("SalesDate")&"</td><td>"&objRS("SalesTime")

    objRS.movenext
    wend

else

response.write "NOTHING HERE"
End if
response.write "</table>"
%>
</body>
</html>


... there is always more to learn...
__________________
... there is always more to learn...
 
Old April 1st, 2005, 06:19 PM
Friend of Wrox
 
Join Date: Jan 2004
Location: , , USA.
Posts: 303
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Is there a way to write directly to the clients harddrive? NO

do i create a file for download on the server? Yes

 
Old April 2nd, 2005, 03:50 PM
Authorized User
 
Join Date: Jun 2003
Location: , , .
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks ... umph ... it kinda sucks but makse sense. Anyways i have tried to create the file on the server (currently localhost for testing) and the IE hangs. So can anyone show me into the direction to create my report as an xml file on the server and the download process? Much appreciated

... there is always more to learn...




Similar Threads
Thread Thread Starter Forum Replies Last Post
loading COM component on client machine hendyhanusin ASP.NET 2.0 Professional 4 June 20th, 2011 02:26 AM
How to save files on client machine. Udi ASP.NET 1.0 and 1.1 Professional 3 January 22nd, 2007 11:26 AM
Saving file on client machine balesh ASP.NET 1.0 and 1.1 Professional 1 September 18th, 2006 07:49 AM
Storing cookies on the client machine m_soni21 ASP.NET 1.0 and 1.1 Basics 1 July 6th, 2006 05:07 PM
save a file on client machine sumsin ASP.NET 1.0 and 1.1 Basics 1 March 30th, 2005 05:52 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.