0

as the questions says I want to call a java method/function when a register in the SQL Server 2008 is inserted or updated so i can process the info through java. Is there a way to do this?? For the moment I'm polling the database every 5 seconds for changes in bit fields (false to true), but I'm having problems with excessive memory usage due to queries. Any help would be appreciated. Thanks in advance

2 Answers 2

1

Is there a way to do this??

I think that the answer is No.

JDBC doesn't provide any way to do callbacks from the database into the JDBC client, so the only option would be to run the Java in the database server. I don't think you can do that with SQL Server.

Sign up to request clarification or add additional context in comments.

Comments

1

Not really. Triggers are built into the database server and can't call to external code unless the database supports that. Not suprisingly SQL Server doesn't have that kind of integration with Java.

PL/SQL and Java on the other hand would work.

1 Comment

Thanks anyway, i guess i'll stick with polling the database

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.