Create MS Access Query

Results 1 to 2 of 2

Thread: Create MS Access Query

  1. #1
    Join Date
    Dec 1969

    Default Create MS Access Query

    Hello,<BR><BR>I am wondering if there is a way to use ASP etc. to create a query in Access - i.e. like a stored procedure. This would then be used by users for label creation programs etc. In a nut shell, I need the query itself, once created by ASP to be stored in Access as an object. Any ideas or suggestions?<BR><BR>Thanks,<BR><BR>Scott Smith

  2. #2
    Join Date
    Dec 1969

    Default RE: Create MS Access Query

    You could certainly create a TEXT string and store that in Access. Then retrieve the text and pass it back in as a query.<BR><BR>But to do that your users have to understand enough to be able to retrieve the text string, in the first place. Of course, if you put the base code in an INCLUDE file, perhaps as a subroutine, then your users could call it just via something like:<BR><BR>&#060;%<BR>Set RS = MakeQueryNumber( 7 )<BR>%&#062;<BR><BR>where you give them a list of identifying query numbers (or names) and then you do the work in the function MakeQueryNumber.<BR><BR>Along those same lines, though, you could create specialized functions that you put in individual INCLUDE files and then the user would do something like:<BR><BR>&#060;! -- #include file="" --&#062;<BR>...<BR>Set RS = GetRecords<BR><BR>and you have a *different* GetRecords in each of the includes.<BR><BR>I think I like the first idea better. It allows you to simply change the query text you put in the special Access table any time you want and/or add new queries. And you just publish a list of which queries are avaiable. Ummm...stupid me. You don&#039t publish it! It&#039s another ASP page that lists the name/number of each query and a description that you provide!<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts