Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 10 total
Thread sql on dbisam without the application
Fri, Dec 22 2006 7:47 PMPermanent Link

thomas
Is it possible with the started dbisam-server to run sql-queriy indipendent from my normal
application. I have an aplication made in delphi, but a query is needing so much time and
i use the internet connection for client-server, so its to slow....
is it possible to make a query direct on the running dbisam (not on my aplication.exe),
which runs every hour (for example) automatically?
Sat, Dec 23 2006 12:34 PMPermanent Link

"Johnnie Norsworthy"
"thomas" <th@iol.pt> wrote in message
news:29149BF8-B413-4622-9813-D37B1A62B8D8@news.elevatesoft.com...
> Is it possible with the started dbisam-server to run sql-queriy
> indipendent from my normal
> application. I have an aplication made in delphi, but a query is needing
> so much time and
> i use the internet connection for client-server, so its to slow....
> is it possible to make a query direct on the running dbisam (not on my
> aplication.exe),
> which runs every hour (for example) automatically?

You could make your own standalone query application with no user interface
that just runs under Windows Scheduler from a workstation, or you can use a
server-based scheduled event. I think either approach wouldn't be too bad
considering the server would be doing all the work and the client does not
need to transfer much over the wire.

-Johnnie

Sat, Dec 23 2006 8:02 PMPermanent Link

Thomas
"Johnnie Norsworthy" <jln206@verizon.net> wrote:

"thomas" <th@iol.pt> wrote in message
news:29149BF8-B413-4622-9813-D37B1A62B8D8@news.elevatesoft.com...
> Is it possible with the started dbisam-server to run sql-queriy
> indipendent from my normal
> application. I have an aplication made in delphi, but a query is needing
> so much time and
> i use the internet connection for client-server, so its to slow....
> is it possible to make a query direct on the running dbisam (not on my
> aplication.exe),
> which runs every hour (for example) automatically?

You could make your own standalone query application with no user interface
that just runs under Windows Scheduler from a workstation, or you can use a
server-based scheduled event. I think either approach wouldn't be too bad
considering the server would be doing all the work and the client does not
need to transfer much over the wire.

-Johnnie

thanks johnnie, but i never made this. Scheduler means, that it's an application, which
runs every time (defined) alone, automatically, yes?
could you make me a little example in delphi code, how this can be, would be agreat help
for me...
i have a separate server running which starts the dbisam server, so the server of my
application could make this as scheduler yes?

are there components from delphi for this?

Sat, Dec 23 2006 9:58 PMPermanent Link

"Johnnie Norsworthy"
Thomas,

As far as the Windows Scheduler goes, all you would need to do is create a
minimal application with all the data access stuff you need on it. I would
just create a Windows forms application to make adding components easy. I'd
put a session, database, and a query component on a form. Set all properties
and SQL as needed. You could have the form appear any way you want, but in
the form's OnShow you should execute your query and then close the form.

You may have to do a trick to be able to close the form automatically, like
set a timer to close it, since Delphi doesn't like to close a Window in
"OnShow" event. In my applications I almost always send a custom message in
"OnShow", which I call "AfterShow", and in that even handler you can run the
query and then close the form.

So now, anytime you want to run the query you can just run that program from
the Windows Explorer, or start it from another application for a "poor man's
multithreaded program".

Now, make Windows run the program for you...

Go to the control panel and select "Scheduled Tasks" and create a new task
to run the application. You'll need to go to the advanced settings to get it
to run more than once a day. From Windows 2000 on a user name and password
is needed to schedule events and the application runs under that account.
You can also check the Tasks Scheduler screen to see when the application
was last run.

There is a Delphi component that can do the task scheduler stuff by code,
but I wouldn't use it unless I had a large number of sites to configure with
this automation.
http://www.sicomponents.com/taskscheduler.html

I hope this helps.

-Johnnie

Tue, Dec 26 2006 2:22 AMPermanent Link

Thomas
Thanks Johnnie, this real help me so much...

One question:
I could start this littel application-Form on my Server, where the dBisam-Server is
running and let the form minmized always open.
I found the Timer-Componente in Delphi and tested it, it'w working fine.
As i have 2-3 different Queries, which i want excecute in different time-intervals, i can
use the same form-application for all queries.
But you told me, you would not use the Delphi scheduler stuff by code, is there any
important reason, not to do this? My sql-update-form would only run on the server...

"Johnnie Norsworthy" <jln206@verizon.net> wrote:

Thomas,

As far as the Windows Scheduler goes, all you would need to do is create a
minimal application with all the data access stuff you need on it. I would
just create a Windows forms application to make adding components easy. I'd
put a session, database, and a query component on a form. Set all properties
and SQL as needed. You could have the form appear any way you want, but in
the form's OnShow you should execute your query and then close the form.

You may have to do a trick to be able to close the form automatically, like
set a timer to close it, since Delphi doesn't like to close a Window in
"OnShow" event. In my applications I almost always send a custom message in
"OnShow", which I call "AfterShow", and in that even handler you can run the
query and then close the form.

So now, anytime you want to run the query you can just run that program from
the Windows Explorer, or start it from another application for a "poor man's
multithreaded program".

Now, make Windows run the program for you...

Go to the control panel and select "Scheduled Tasks" and create a new task
to run the application. You'll need to go to the advanced settings to get it
to run more than once a day. From Windows 2000 on a user name and password
is needed to schedule events and the application runs under that account.
You can also check the Tasks Scheduler screen to see when the application
was last run.

There is a Delphi component that can do the task scheduler stuff by code,
but I wouldn't use it unless I had a large number of sites to configure with
this automation.
http://www.sicomponents.com/taskscheduler.html

I hope this helps.

-Johnnie

Tue, Dec 26 2006 10:20 AMPermanent Link

"Johnnie Norsworthy"
I was saying I would not create the actual Windows Task in code unless
absolutely necessary.

If you are running on the server computer, you should look in the DBISAM
help file (at least version 4) under "Scheduled Events". You'd just create a
procedure in the server to run at whatever time you wish and recompile that
code.

-Johnnie

Wed, Dec 27 2006 5:48 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Thomas,

<< Is it possible with the started dbisam-server to run sql-queriy
indipendent from my normal application. I have an aplication made in delphi,
but a query is needing so much time and i use the internet connection for
client-server, so its to slow.... is it possible to make a query direct on
the running dbisam (not on my aplication.exe), which runs every hour (for
example) automatically? >>

Sure, just check out the section entitled "Scheduled Events" here:

http://www.elevatesoft.com/dbisam4d5_customizing_engine.htm

Scheduled events must be coded in the actual database server project and
then configured via the Server Administration Utility (or via code using the
TDBISAMSession or TDBISAMEngine component).   Via the Server Administration
Utility, you can configure a scheduled event using the Events tab after
logging in to the database server as an administrator.  Via code, you can
use the methods detailed here:

http://www.elevatesoft.com/dbisam4d5_server_administration.htm

--
Tim Young
Elevate Software
www.elevatesoft.com

Sat, Dec 30 2006 2:06 PMPermanent Link

Thomas
Hi Tim, thanks for your informations.
when i login into the Server Adminstr. Utility and go to the events, how i can create an
event, for example a simple query like "update apn set timer1 = null where timer1 is not
null" ?
I add a new event, gave the name "update" for the event, put the query into the
description, choosed Run Type Hourly and choose Starting 2 minutes later and then saved...
but nothing happened.
where i have to insert my query which i want to run every hour? there are only the options
once, hourly, daily a.s.o. but can i also choose minutes?

"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote:

Thomas,

<< Is it possible with the started dbisam-server to run sql-queriy
indipendent from my normal application. I have an aplication made in delphi,
but a query is needing so much time and i use the internet connection for
client-server, so its to slow.... is it possible to make a query direct on
the running dbisam (not on my aplication.exe), which runs every hour (for
example) automatically? >>

Sure, just check out the section entitled "Scheduled Events" here:

http://www.elevatesoft.com/dbisam4d5_customizing_engine.htm

Scheduled events must be coded in the actual database server project and
then configured via the Server Administration Utility (or via code using the
TDBISAMSession or TDBISAMEngine component).   Via the Server Administration
Utility, you can configure a scheduled event using the Events tab after
logging in to the database server as an administrator.  Via code, you can
use the methods detailed here:

http://www.elevatesoft.com/dbisam4d5_server_administration.htm

--
Tim Young
Elevate Software
www.elevatesoft.com

Sun, Dec 31 2006 5:30 AMPermanent Link

"Frans van Daalen"

"Thomas" <info@magoarte.com> wrote in message
news:50E75BC3-4066-4431-B690-9FC33BCA7F9F@news.elevatesoft.com...
> Hi Tim, thanks for your informations.
> when i login into the Server Adminstr. Utility and go to the events, how i
> can create an
> event, for example a simple query like "update apn set timer1 = null where
> timer1 is not
> null" ?
> I add a new event, gave the name "update" for the event, put the query
> into the
> description, choosed Run Type Hourly and choose Starting 2 minutes later
> and then saved...
> but nothing happened.
> where i have to insert my query which i want to run every hour? there are
> only the options
> once, hourly, daily a.s.o. but can i also choose minutes?
>
> "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote:
>
> Scheduled events must be coded in the actual database server project and
> then configured via the Server Administration Utility (or via code using
> the
> TDBISAMSession or TDBISAMEngine component).   Via the Server
> Administration

You might have missed the "must be coded" You need to add this to the source
of the server.

Tue, Jan 2 2007 2:06 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Thomas,

<< when i login into the Server Adminstr. Utility and go to the events, how
i can create an event, for example a simple query like "update apn set
timer1 = null where timer1 is not null" ? >>

You have to add the actual code for the event into the database server
itself (dbsrvr.dpr) that is provided with DBISAM in the
<installdir>\servers\dbsrvr\source directory.

<< there are only the options once, hourly, daily a.s.o. but can i also
choose minutes? >>

No, there is no option for minutes.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image