• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 352
  • Last Modified:

Create and send a custom/windows message from sybase to Delphi Application

Hi,
I was just wondering if I could create a custom/windows message inside Sybase (on firing of a trigger ,say) and access that through a Delphi Application.I am using Adaptive server anywhere 7 and Delphi 5.0 on a Windows 2000 system.But of course the messaging would have to work on all Windows operating systems.

Thanks for any help.
Pat  
0
Patranjali
Asked:
Patranjali
1 Solution
 
gletiecqCommented:
Unless you want to have the Delphi app poll the database looking for a flag that says it should pop up the message, no, you can't.  A database server is not designed to interact with the user GUI directly.

However, ASA7 supports java, and with java there's always a way to work around things, as long as you can figure out what client is supposed to get the message.

If you're simply trying to get some debug output, though, use the PRINT statement in your batch.  It'll print a user message to the console.  

Example:

create procedure proc_test()
BEGIN
declare thecount int;
select count(*) into thecount from dba.mytable;

if thecount > 100 then
   PRINT 'There are ' || thecount || ' rows in mytable';
end if;
END

call proc_test;

Does this help?

Greg
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now