periodic check for records to print

G

Guest

Every 10 seconds I need to search a SQL table for orders to print. The orders
are created through WebForms on ASP.NET clients. The orders should not print
until
10 minutes before they are due.

The network printer will be available from the server running IIS and SQL
Server 2000.

If this were a Windows Forms application, then I would create a system timer
in Form1.Load(). How is this done in an ASP.NET application?
 
T

Terry Burns

Just a note of caution. Writing windows services can be tricky, so just be
prepared to possibly have to spend a little time with it. Debugging is a
little more complex and awkward.
 
G

Guest

Thanks for the advice to separate the printing function. I am a little
familiar with the service programming model. The last service I wrote was for
NT 3.51 many many moons ago. I remember some limitations to accessing the GDI
and databases.

My printing function must connect and access data on SQL Server and then
print. I read through the information at the url that Phillip provided and
all of the other pages in that section. I stll have a couple questions
remaining:

Is there tech support that documents the .NET namespaces that can be used
inside a windows service?
Can I use the ADO.NET functions inside a windows service?
Can I print a crystal report from a windows service,
or can I use the GDI+ and System.Drawing.Printing.PrintDocument.Print()
method from a windows service?
 
G

Guest

Hi Tony,

As long as the PC that will run the server has the .net framework installed
then all of the functions that you listed will be available to the Windows
Service, as it would to any desktop application. The main difference between
the Windows Service and the desktop application is that in the former you
would not display a GUI that requires user input.
 
G

Guest

sorry for couple week delay as I moved from design to implementation ...
Now I have created my windows service

The printdocument.print function is NOT firing the printPage event.

I am using several eventlog.WriteEntry() statements to know how my program
is working and which functions are called. The structure of the program is
similar to the example in the PrintDocument Class documentation.

There is no microsoft.public.dotnet.service group, so I am not sure if this
dotnet.framework.aspnet group is the proper place to continue this discussion.

I will post the question again at microsoft.public.dotnet.framework and
include my source code.

btw, the data entry web pages are working very nicely...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top