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
  #1 (permalink)  
Old August 20th, 2003, 01:18 PM
Registered User
 
Join Date: Aug 2003
Location: , , United Kingdom.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to fizzystutter
Default Pass value into Access Report

I am trying to automate production of an Access report via ASP.

I have almost got there apart from the fact that I want to send either an
SQL statment or a value into the SQL within the report:

My code is:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Dim objAccess
Set objAccess = Server.CreateObject("Access.Application")

objAccess.OpenCurrentDatabase server.MapPath("data.mdb")
objAccess.DoCmd.OutputTo 3, "companycontacts", "Snapshot Format (*.snp)",
"C:\Inetpub\wwwroot\Access_Reports\companycontacts .snp"
objAccess.DoCmd.Quit 2
set objAccess = nothing

response.redirect "index.asp"
%>


The SQL within the report at the moment is:

Select * from companycontacts

However what I would like is to be able to send values like (just as you would normally):

where companyname = 'Abacus Lighting Ltd' or companyname = 'Lighting Ltd' or
companyname = 'CSM Ltd'..................

etc, etc, etc

Has anyone come across a way of doing this ???

thanks for any replies



Similar Threads
Thread Thread Starter Forum Replies Last Post
Crystal Report Parameter pass from c# shriji.1111 Crystal Reports 4 June 14th, 2011 11:38 AM
How to pass parameter to a crystal report using c# preetakrish BOOK: Professional Crystal Reports for VS.NET 16 November 19th, 2009 05:26 AM
pass parameter in crystal report srivigdev C# 3 April 14th, 2008 12:11 PM
How to pass parameters to MS Access report murtazasif Access VBA 1 November 2nd, 2007 06:42 AM
How to pass parameter to sub-report . azeerum Access 1 January 3rd, 2005 04:26 PM





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