Click to See Complete Forum and Search --> : Saving A Print Action to the database


samflex
08-14-2004, 05:55 PM
Hello all,
I am a first time visitor.

We currently have an access application that we need to transform to web application.

So far, several of the tasks have been successfully completed.

There is a functionality that I seem very stumped with.

We have a field called PRINTED. It has a value of true or false.

On the access application, a database is queried.
Once a hit is made, the user is given the option to print that screen.
If the screen is printed, a value of True is stored on the database.

By default, the value is false (if that record has not been printed before)

Essentially, when the database is queried and there is a hit, if that record has been printed before, there is a checkmark on the checkbox indicating it has been printed.

Can someone please give me a suggestion of this could be implemented with asp?

A sample code or link to one would be great.

This was not coded in access database.
I believe there was a built-in access database macro used to accomplish this task.

BTW: I am not even sure this is possible.

So far, the only thing I can think of is to create an sql update statement that says something like:


UPDATE table SET table.PRINTED = True
WHERE table.PRINTED = False;


I am just having problem coming up with an asp script that will put a checkmark on the PRINTED field when a record/records has/have been printed.


Thanks in advance.

buntine
08-14-2004, 10:53 PM
You may have to use some Access Macro or ActiveX control because im quite sure that ASP alone cannot detect a print action from the client-side. However, you can print from the server by outputing text to the clients printer. The guys at asp101 have a nice little tutorial: http://www.asp101.com/articles/john/serversideprint/default.asp

Also, in your database you will have to reference the certain records unique ID (which should be the primary key the database) by using the WHERE clause, otherwise every unprinted record will be set yo true by using your SQL query.

Regards,
Andrew Buntine.

samflex
08-15-2004, 09:40 AM
Thanks for the response Andrew,
That's my brother's name, btw.

Yes, the current update sql just updates everything and you are right, I have problem with that logic, myself.

About macro and active x, how can they be used in conjuction with asp?

The asp101 tutorial doesn't address saving a print action to the database.

As indicated in my first post, the field name is PRINTED.

If you print a record, we want the PRINTED field to be checked to indicate a print action had taken place.

Quite frankly, it is tough to make this happen, because clicking print doesn't necessarily mean that something had actually printed.

Any further input will be appreciated.