By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,640 Members | 2,355 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,640 IT Pros & Developers. It's quick & easy.

Automate a message box based on UPDATE?

P: n/a
Hello all!

I'm working in vb/ado.net I want to to have a message box pop up based on a
result of a update on a SQL table. How do I do that so it automaticly pops
up after the update is performed?

Also, is there a way to put in a variable in the message box base on the
results of the Update?

TIA!!
Rudy
Jul 9 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Rudy wrote:
I'm working in vb/ado.net I want to to have a message box pop up based on a
result of a update on a SQL table. How do I do that so it automaticly pops
up after the update is performed?
Just put the code that shows the message box after the code that updates
the table.
Also, is there a way to put in a variable in the message box base on the
results of the Update?
You can put whatever you want in the string that you use to show the
message box.
Jul 9 '06 #2

P: n/a
Hi Goran!

OK, Sorry. Didn't make myself clear on this. I have a server application
and a client application. The update will be executed at the server app, but
after it's done I want the message box to show up on the client app. So how
do I watch that update from the client. I know I can create a click event on
the client to look for the update. But I wouldn't think I would loop that.
Looking fot the best way.

Thanks!

Rudy

"Göran Andersson" wrote:
Rudy wrote:
I'm working in vb/ado.net I want to to have a message box pop up based on a
result of a update on a SQL table. How do I do that so it automaticly pops
up after the update is performed?

Just put the code that shows the message box after the code that updates
the table.
Also, is there a way to put in a variable in the message box base on the
results of the Update?

You can put whatever you want in the string that you use to show the
message box.
Jul 10 '06 #3

P: n/a
Hi Rudy

It sounds like you want some form of notification sent to the client
app when a change happens at the DB. If this is correct then there's a
couple of options that I'm aware of (depending on your DB).

If you're using SQL 2000 then one of the "common" options is to have an
extended proc that runs via a trigger on the table(s) that you want to
monitor. This proc basically writes details of the change to a file
that is accessible from the client app, and the client app watches this
file for changes using a file-watcher, when a change is picked up, the
client can read the file for what the change was and act accordingly.
I seem to remember something on Codeproject.com that dealt with this.

Alternatively, if you're using SQL 2005 then there is an updated
version of notification services available that will send out
notifications to all interested parties - take a look on MSDN as I'm
sure there's lots of info there.

Hope that helps
Martin
Rudy wrote:
Hi Goran!

OK, Sorry. Didn't make myself clear on this. I have a server application
and a client application. The update will be executed at the server app,but
after it's done I want the message box to show up on the client app. So how
do I watch that update from the client. I know I can create a click event on
the client to look for the update. But I wouldn't think I would loop that.
Looking fot the best way.

Thanks!

Rudy

"Gran Andersson" wrote:
Rudy wrote:
I'm working in vb/ado.net I want to to have a message box pop up based on a
result of a update on a SQL table. How do I do that so it automaticly pops
up after the update is performed?
Just put the code that shows the message box after the code that updates
the table.
Also, is there a way to put in a variable in the message box base on the
results of the Update?
You can put whatever you want in the string that you use to show the
message box.
Jul 10 '06 #4

P: n/a
Hi Pritcham!

Sounds like a good idea!! I'm using SQL 2000. I'll look for that extended
proc. I'll let y you kow how it goes.

Thanks!
Rudy
"Pritcham" wrote:
Hi Rudy

It sounds like you want some form of notification sent to the client
app when a change happens at the DB. If this is correct then there's a
couple of options that I'm aware of (depending on your DB).

If you're using SQL 2000 then one of the "common" options is to have an
extended proc that runs via a trigger on the table(s) that you want to
monitor. This proc basically writes details of the change to a file
that is accessible from the client app, and the client app watches this
file for changes using a file-watcher, when a change is picked up, the
client can read the file for what the change was and act accordingly.
I seem to remember something on Codeproject.com that dealt with this.

Alternatively, if you're using SQL 2005 then there is an updated
version of notification services available that will send out
notifications to all interested parties - take a look on MSDN as I'm
sure there's lots of info there.

Hope that helps
Martin
Rudy wrote:
Hi Goran!

OK, Sorry. Didn't make myself clear on this. I have a server application
and a client application. The update will be executed at the server app, but
after it's done I want the message box to show up on the client app. So how
do I watch that update from the client. I know I can create a click event on
the client to look for the update. But I wouldn't think I would loop that.
Looking fot the best way.

Thanks!

Rudy

"Göran Andersson" wrote:
Rudy wrote:
I'm working in vb/ado.net I want to to have a message box pop up based on a
result of a update on a SQL table. How do I do that so it automaticly pops
up after the update is performed?
>
Just put the code that shows the message box after the code that updates
the table.
>
Also, is there a way to put in a variable in the message box base on the
results of the Update?
>
You can put whatever you want in the string that you use to show the
message box.
>

Jul 10 '06 #5

P: n/a
Hi Rudy

Here's a link to one of the articles on codeproject (I knew I'd
bookmarked it!!)

http://www.codeproject.com/cs/databa...ntsArticle.asp

Hope that helps

Martin
Rudy wrote:
Hi Pritcham!

Sounds like a good idea!! I'm using SQL 2000. I'll look for that extended
proc. I'll let y you kow how it goes.

Thanks!
Rudy
"Pritcham" wrote:
Hi Rudy

It sounds like you want some form of notification sent to the client
app when a change happens at the DB. If this is correct then there's a
couple of options that I'm aware of (depending on your DB).

If you're using SQL 2000 then one of the "common" options is to have an
extended proc that runs via a trigger on the table(s) that you want to
monitor. This proc basically writes details of the change to a file
that is accessible from the client app, and the client app watches this
file for changes using a file-watcher, when a change is picked up, the
client can read the file for what the change was and act accordingly.
I seem to remember something on Codeproject.com that dealt with this.

Alternatively, if you're using SQL 2005 then there is an updated
version of notification services available that will send out
notifications to all interested parties - take a look on MSDN as I'm
sure there's lots of info there.

Hope that helps
Martin
Rudy wrote:
Hi Goran!
>
OK, Sorry. Didn't make myself clear on this. I have a server application
and a client application. The update will be executed at the server app, but
after it's done I want the message box to show up on the client app. So how
do I watch that update from the client. I know I can create a click event on
the client to look for the update. But I wouldn't think I would loop that.
Looking fot the best way.
>
Thanks!
>
Rudy
>
"Gran Andersson" wrote:
>
Rudy wrote:
I'm working in vb/ado.net I want to to have a message box pop upbased on a
result of a update on a SQL table. How do I do that so it automaticly pops
up after the update is performed?

Just put the code that shows the message box after the code that updates
the table.

Also, is there a way to put in a variable in the message box baseon the
results of the Update?

You can put whatever you want in the string that you use to show the
message box.
Jul 11 '06 #6

P: n/a
Thanks Martin!

I already got it working with your advice. A little diffrent than what this
article does. I just created a trigger to watch a table for update or
insert. Then it will update a txt file on the server, and a filewatch to
watch that file for a change. One a change happens a a message box will pop
up. The user doesn't have access to the computer, just the app, so I have a
lot of control of the file structure.

Thanks again for your help!

Rudy
"Pritcham" wrote:
Hi Rudy

Here's a link to one of the articles on codeproject (I knew I'd
bookmarked it!!)

http://www.codeproject.com/cs/databa...ntsArticle.asp

Hope that helps

Martin
Rudy wrote:
Hi Pritcham!

Sounds like a good idea!! I'm using SQL 2000. I'll look for that extended
proc. I'll let y you kow how it goes.

Thanks!
Rudy
"Pritcham" wrote:
Hi Rudy
>
It sounds like you want some form of notification sent to the client
app when a change happens at the DB. If this is correct then there's a
couple of options that I'm aware of (depending on your DB).
>
If you're using SQL 2000 then one of the "common" options is to have an
extended proc that runs via a trigger on the table(s) that you want to
monitor. This proc basically writes details of the change to a file
that is accessible from the client app, and the client app watches this
file for changes using a file-watcher, when a change is picked up, the
client can read the file for what the change was and act accordingly.
I seem to remember something on Codeproject.com that dealt with this.
>
Alternatively, if you're using SQL 2005 then there is an updated
version of notification services available that will send out
notifications to all interested parties - take a look on MSDN as I'm
sure there's lots of info there.
>
Hope that helps
Martin
Rudy wrote:
Hi Goran!

OK, Sorry. Didn't make myself clear on this. I have a server application
and a client application. The update will be executed at the server app, but
after it's done I want the message box to show up on the client app. So how
do I watch that update from the client. I know I can create a click event on
the client to look for the update. But I wouldn't think I would loop that.
Looking fot the best way.

Thanks!

Rudy

"Göran Andersson" wrote:

Rudy wrote:
I'm working in vb/ado.net I want to to have a message box pop up based on a
result of a update on a SQL table. How do I do that so it automaticly pops
up after the update is performed?
>
Just put the code that shows the message box after the code that updates
the table.
>
Also, is there a way to put in a variable in the message box base on the
results of the Update?
>
You can put whatever you want in the string that you use to show the
message box.
>
>
>

Jul 12 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.