Home All Groups Group Topic Archive Search About
Author
23 May 2005 7:28 PM
taccea
Hello, I am new to VB and MySQL connections.

I can use ether VB6 or VB.NET.

I need to make an ODBC connection to MySQL
and then I need to have the VB program poll the table
every 10 minutes.
What are some general guidles to acomplish this?

Thanks
Taccea

Author
24 May 2005 12:00 AM
Veign
Form Template: MySQL Connection Property Form:
http://www.veign.com/vrc_codeview.asp?type=app&id=92

VB MySQL:
http://www.vbmysql.com/

Above are some samples to connect to a MySQL database using the ODBC
connector.  What exact issues are you having?

--
Chris Hanscom - Microsoft MVP (VB)
Veign's Resource Center
http://www.veign.com/vrc_main.asp
--
Read. Decide. Sign the petition to Microsoft.
http://classicvb.org/petition/


Show quoteHide quote
"taccea" <tac***@adelphia.net> wrote in message
news:XdGdnZgE4et0sw_fRVn-1w@adelphia.com...
> Hello, I am new to VB and MySQL connections.
>
> I can use ether VB6 or VB.NET.
>
> I need to make an ODBC connection to MySQL
> and then I need to have the VB program poll the table
> every 10 minutes.
> What are some general guidles to acomplish this?
>
> Thanks
> Taccea
>
>
Author
24 May 2005 12:11 AM
Andrew D. Newbould
In message <XdGdnZgE4et0sw_fRVn***@adelphia.com>, taccea
<tac***@adelphia.net> writes
>Hello, I am new to VB and MySQL connections.
>
>I can use ether VB6 or VB.NET.
>
>I need to make an ODBC connection to MySQL
>and then I need to have the VB program poll the table
>every 10 minutes.
>What are some general guidles to acomplish this?
>
>Thanks
>Taccea

It really depends on what you want to do in the database every 10
minutes. However, generally you would add a timer to your Form and set
it to fire once a minute (no point firing more frequently as your going
to ignore anyway). On every 10th firing on the event you would:

1.  Stop the Timer.
2.  Make connection to MySQL.
3.  Perform polling of required table and apply any updates.
4.  Close connection to MySQL.
5.  Reset counters.
6.  Restart the Timer.

You would normally Stop and Start the timer just in case your polling
operations take more than 10 minutes (ie: you don't want the event to
fire again while you are in the middle of processing the previous one).

If you only want to read a table to extract something that is relevant
to your application then I would suggest using a FireHose cursor (ie:
client side, read only, forward only) for speed.

If you need to update the database during the processing then pick an
appropriate cursor.

Don't forget to and some DoEvents into your processing loop to keep
things running smoothly.

--
Andrew D. Newbould                  E-Mail:  newsgroups@NOSPAMzadsoft.com

ZAD Software Systems                Web   :  www.zadsoft.com