MySql with Visual Basic
am 10.03.2005 16:20:28 von James Murphy
--0-1596697399-1110468028=:39162
Content-Type: text/plain; charset=us-ascii
I am trying to find some information on using Visual Basic with MySql. What works and what does not. How do I handle a timestamp field.
---------------------------------
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
--0-1596697399-1110468028=:39162--
RE: MySql with Visual Basic
am 10.03.2005 17:52:12 von Lawrence Martin
Inquiry To List:
From: James Murphy [mailto:jameshmurphy@yahoo.com]
Sent: Thursday, March 10, 2005 10:20 AM
To: win32@lists.mysql.com
Subject: MySql with Visual Basic
I am trying to find some information on using Visual Basic with MySql. What
works and what does not. How do I handle a timestamp field.
============================================================ =============
Reply To List: March 10, 2005
I am using VB6 (VS6, Enterprise) with MySQL 4.1.10 and MySQL ODBC 3.5.11
using XP Pro OS.
Recently I have been 'fooling around' with the Microsoft Active-X Data
Objects (ADO) interface using the 'adodc' and 'datagrid' components under
ADO 2.8 Libraries.
Also, I would recommend looking at the ADO samples from Microsoft in the
MSDN collection if you have it. The DataObjects Collection object that maps
(links) external database fields to VB components is a very powerful concept
and works brilliantly !
As far as a MySQL timestamp field is concerned, I have found that mapping it
to a VB text field and parsing the various elements as needed 'works for me'
(ie. working with it as a VB string)
ADO is covered in rich detail in various Microsoft online venues (MSDN et
al), many different VB user groups on the web, and in the technical
literature. I could recommend two books that I have; 'Serious ADO: Universal
Data Access with Visual Basic' by Rob Macdonald and 'ADO Examples and Best
Practices' by William R. Vaughn.
HTH !
Regards,
Larry Martin
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
Re: MySql with Visual Basic
am 10.03.2005 18:17:50 von Daniel da Veiga
I wouldn't use ADO to connect with MySQL, it seems that you'll have
more trouble dealing with the objects than really doying any work with
the database itself. I am using an old version of a standalone library
called MyVBqL, that later evolved into VBMySQLDirect, wich is still
under development I believe... Its a single dll that can be easily
registered, solving many problems (VBA for instance, when Word can't
find the datasources).
Hope that helps,
On Thu, 10 Mar 2005 11:52:12 -0500, Lawrence Martin wrote:
> Inquiry To List:
>
> From: James Murphy [mailto:jameshmurphy@yahoo.com]
> Sent: Thursday, March 10, 2005 10:20 AM
> To: win32@lists.mysql.com
> Subject: MySql with Visual Basic
>
> I am trying to find some information on using Visual Basic with MySql. What
> works and what does not. How do I handle a timestamp field.
>
> ============================================================ =============
> Reply To List: March 10, 2005
>
> I am using VB6 (VS6, Enterprise) with MySQL 4.1.10 and MySQL ODBC 3.5.11
> using XP Pro OS.
>
> Recently I have been 'fooling around' with the Microsoft Active-X Data
> Objects (ADO) interface using the 'adodc' and 'datagrid' components under
> ADO 2.8 Libraries.
>
> Also, I would recommend looking at the ADO samples from Microsoft in the
> MSDN collection if you have it. The DataObjects Collection object that maps
> (links) external database fields to VB components is a very powerful concept
> and works brilliantly !
>
> As far as a MySQL timestamp field is concerned, I have found that mapping it
> to a VB text field and parsing the various elements as needed 'works for me'
> (ie. working with it as a VB string)
>
> ADO is covered in rich detail in various Microsoft online venues (MSDN et
> al), many different VB user groups on the web, and in the technical
> literature. I could recommend two books that I have; 'Serious ADO: Universal
> Data Access with Visual Basic' by Rob Macdonald and 'ADO Examples and Best
> Practices' by William R. Vaughn.
>
> HTH !
>
> Regards,
> Larry Martin
>
> --
> MySQL Windows Mailing List
> For list archives: http://lists.mysql.com/win32
> To unsubscribe: http://lists.mysql.com/win32?unsub=danieldaveiga@gmail.com
>
>
--
Daniel da Veiga
Computer Operator - RS - Brazil
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
Re: MySql with Visual Basic
am 10.03.2005 19:19:57 von SGreen
--=_alternative 0064F89C85256FC0_=
Content-Type: text/plain; charset="US-ASCII"
I use ADO through MyODBC but I DO NOT use any of the automation (no
querygrids, no data binding, nothing). I am using it strictly as a SQL
command conduit (Connections and Recordsets only). All data and schema
manipulation statements are composed in code and executed through the
Connection.Execute() and I only use Recordset.Open when I need data from
the database.
I know that I have ignored 90% of what ADO *could* do for me but I have
found that if I keep it simple (very simple), it's very stable and I don't
have to worry about if a control has created a lock or not or if I have a
recordset change pending (I never do) or any of the ODBC/ADO problems with
DATE, TIME, DATETIME, or TIMESTAMP values. I control every other aspect
of the data presentation (which works out very well for me when building
data-driven web pages). This means that if I need to cast a time value as
a string and back again, I have control over that while I don't have that
much influence over a bound control.
Based on the range of the responses you are getting, it seems that there
are MANY ways to hook VB into MySQL and make it work. I don't think that
any of us will say "my way is BEST" but we all make it work and each
method has its own advantages and disadvantages. My advice is to try
something and see if it works. If it's not what you expected, try
something else. Since we are all actually using MySQL with
VB/VBA/VBScript, any one of our methods may be a nice place to start.
Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
PS a good place to read up on ADO vs. MySQL is
http://dev.mysql.com/tech-resources/articles/index.html. Here are some of
the articles I found useful in getting ADO (and MS Access) to "play nice"
with MySQL
http://dev.mysql.com/tech-resources/articles/migrating-from- microsoft.html
http://dev.mysql.com/tech-resources/articles/visual-basic-da tatypes.html
http://dev.mysql.com/tech-resources/articles/vb-blob-handlin g.html
http://dev.mysql.com/doc/mysql/en/programs-known-to-work-wit h-myodbc.html
http://dev.mysql.com/doc/mysql/en/myodbc-with-vb.html
Don't forget, all of the lists are archived and searchable:
http://lists.mysql.com/
As are the forums: http://forums.mysql.com/
Daniel da Veiga wrote on 03/10/2005 02:17:50 PM:
> I wouldn't use ADO to connect with MySQL, it seems that you'll have
> more trouble dealing with the objects than really doying any work with
> the database itself. I am using an old version of a standalone library
> called MyVBqL, that later evolved into VBMySQLDirect, wich is still
> under development I believe... Its a single dll that can be easily
> registered, solving many problems (VBA for instance, when Word can't
> find the datasources).
>
> Hope that helps,
>
>
> On Thu, 10 Mar 2005 11:52:12 -0500, Lawrence Martin
> com> wrote:
> > Inquiry To List:
> >
> > From: James Murphy [mailto:jameshmurphy@yahoo.com]
> > Sent: Thursday, March 10, 2005 10:20 AM
> > To: win32@lists.mysql.com
> > Subject: MySql with Visual Basic
> >
> > I am trying to find some information on using Visual Basic with MySql.
What
> > works and what does not. How do I handle a timestamp field.
> >
> >
============================================================ =============
> > Reply To List: March 10, 2005
> >
> > I am using VB6 (VS6, Enterprise) with MySQL 4.1.10 and MySQL ODBC
3.5.11
> > using XP Pro OS.
> >
> > Recently I have been 'fooling around' with the Microsoft Active-X Data
> > Objects (ADO) interface using the 'adodc' and 'datagrid' components
under
> > ADO 2.8 Libraries.
> >
> > Also, I would recommend looking at the ADO samples from Microsoft in
the
> > MSDN collection if you have it. The DataObjects Collection object that
maps
> > (links) external database fields to VB components is a very powerful
concept
> > and works brilliantly !
> >
> > As far as a MySQL timestamp field is concerned, I have found that
mapping it
> > to a VB text field and parsing the various elements as needed 'works
for me'
> > (ie. working with it as a VB string)
> >
> > ADO is covered in rich detail in various Microsoft online venues (MSDN
et
> > al), many different VB user groups on the web, and in the technical
> > literature. I could recommend two books that I have; 'Serious
ADO:Universal
> > Data Access with Visual Basic' by Rob Macdonald and 'ADO Examples and
Best
> > Practices' by William R. Vaughn.
> >
> > HTH !
> >
> > Regards,
> > Larry Martin
> >
> > --
> > MySQL Windows Mailing List
> > For list archives: http://lists.mysql.com/win32
> > To unsubscribe: http://lists.mysql.com/win32?
> unsub=danieldaveiga@gmail.com
> >
> >
>
>
> --
> Daniel da Veiga
> Computer Operator - RS - Brazil
>
> --
> MySQL Windows Mailing List
> For list archives: http://lists.mysql.com/win32
> To unsubscribe: http://lists.mysql.com/win32?unsub=sgreen@unimin.com
>
--=_alternative 0064F89C85256FC0_=--
RE: MySql with Visual Basic
am 13.03.2005 22:41:27 von jbonnett
I do the same as Shawn, although I use VBMySQLDirect, and it works very
well. I make my own data-binding arrangements when I need them and don't
miss ADO at all.
John Bonnett=20
-----Original Message-----
From: SGreen@unimin.com [mailto:SGreen@unimin.com]=20
Sent: Friday, 11 March 2005 4:50 AM
To: James Murphy
Cc: MySQL Win32 List
Subject: Re: MySql with Visual Basic
I use ADO through MyODBC but I DO NOT use any of the automation (no=20
querygrids, no data binding, nothing). I am using it strictly as a SQL=20
command conduit (Connections and Recordsets only). All data and schema=20
manipulation statements are composed in code and executed through the=20
Connection.Execute() and I only use Recordset.Open when I need data from
the database.
I know that I have ignored 90% of what ADO *could* do for me but I have=20
found that if I keep it simple (very simple), it's very stable and I
don't=20
have to worry about if a control has created a lock or not or if I have
a=20
recordset change pending (I never do) or any of the ODBC/ADO problems
with=20
DATE, TIME, DATETIME, or TIMESTAMP values. I control every other aspect
of the data presentation (which works out very well for me when building
data-driven web pages). This means that if I need to cast a time value
as=20
a string and back again, I have control over that while I don't have
that=20
much influence over a bound control.
Based on the range of the responses you are getting, it seems that there
are MANY ways to hook VB into MySQL and make it work. I don't think that
any of us will say "my way is BEST" but we all make it work and each=20
method has its own advantages and disadvantages. My advice is to try=20
something and see if it works. If it's not what you expected, try=20
something else. Since we are all actually using MySQL with=20
VB/VBA/VBScript, any one of our methods may be a nice place to start.
Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
PS a good place to read up on ADO vs. MySQL is=20
http://dev.mysql.com/tech-resources/articles/index.html. Here are some
of=20
the articles I found useful in getting ADO (and MS Access) to "play
nice"=20
with MySQL
http://dev.mysql.com/tech-resources/articles/migrating-from- microsoft.ht
ml
http://dev.mysql.com/tech-resources/articles/visual-basic-da tatypes.html
http://dev.mysql.com/tech-resources/articles/vb-blob-handlin g.html
http://dev.mysql.com/doc/mysql/en/programs-known-to-work-wit h-myodbc.htm
l
http://dev.mysql.com/doc/mysql/en/myodbc-with-vb.html
Don't forget, all of the lists are archived and searchable:=20
http://lists.mysql.com/
As are the forums: http://forums.mysql.com/
Daniel da Veiga wrote on 03/10/2005 02:17:50
PM:
> I wouldn't use ADO to connect with MySQL, it seems that you'll have
> more trouble dealing with the objects than really doying any work with
> the database itself. I am using an old version of a standalone library
> called MyVBqL, that later evolved into VBMySQLDirect, wich is still
> under development I believe... Its a single dll that can be easily
> registered, solving many problems (VBA for instance, when Word can't
> find the datasources).
>=20
> Hope that helps,
>=20
>=20
> On Thu, 10 Mar 2005 11:52:12 -0500, Lawrence Martin
> com> wrote:
> > Inquiry To List:
> >=20
> > From: James Murphy [mailto:jameshmurphy@yahoo.com]
> > Sent: Thursday, March 10, 2005 10:20 AM
> > To: win32@lists.mysql.com
> > Subject: MySql with Visual Basic
> >=20
> > I am trying to find some information on using Visual Basic with
MySql.=20
What
> > works and what does not. How do I handle a timestamp field.
> >=20
> >=20
==================== =====3D=
==================== =====3D=
==================== ==
=3D
> > Reply To List: March 10, 2005
> >=20
> > I am using VB6 (VS6, Enterprise) with MySQL 4.1.10 and MySQL ODBC=20
3.5.11
> > using XP Pro OS.
> >=20
> > Recently I have been 'fooling around' with the Microsoft Active-X
Data
> > Objects (ADO) interface using the 'adodc' and 'datagrid' components=20
under
> > ADO 2.8 Libraries.
> >=20
> > Also, I would recommend looking at the ADO samples from Microsoft in
the
> > MSDN collection if you have it. The DataObjects Collection object
that=20
maps
> > (links) external database fields to VB components is a very powerful
concept
> > and works brilliantly !
> >=20
> > As far as a MySQL timestamp field is concerned, I have found that=20
mapping it
> > to a VB text field and parsing the various elements as needed 'works
for me'
> > (ie. working with it as a VB string)
> >=20
> > ADO is covered in rich detail in various Microsoft online venues
(MSDN=20
et
> > al), many different VB user groups on the web, and in the technical
> > literature. I could recommend two books that I have; 'Serious=20
ADO:Universal
> > Data Access with Visual Basic' by Rob Macdonald and 'ADO Examples
and=20
Best
> > Practices' by William R. Vaughn.
> >=20
> > HTH !
> >=20
> > Regards,
> > Larry Martin
> >=20
> > --
> > MySQL Windows Mailing List
> > For list archives: http://lists.mysql.com/win32
> > To unsubscribe: http://lists.mysql.com/win32?
> unsub=3Ddanieldaveiga@gmail.com
> >=20
> >=20
>=20
>=20
> --=20
> Daniel da Veiga
> Computer Operator - RS - Brazil
>=20
> --=20
> MySQL Windows Mailing List
> For list archives: http://lists.mysql.com/win32
> To unsubscribe:
http://lists.mysql.com/win32?unsub=3Dsgreen@unimin.com
>=20
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org
RE: MySql with Visual Basic
am 04.04.2005 23:31:24 von John.Cook
Just my quick question here, I've read some about VBMySQLDirect and one =
big missing feature is parameterized queries. How do you do without?
Thanks,
-John C.
> -----Original Message-----
> From: John Bonnett, R&D Australia [SMTP:jbonnett@sola.com.au]
> Sent: Sunday, March 13, 2005 4:41 PM
> To: SGreen@unimin.com; James Murphy
> Cc: MySQL Win32 List
> Subject: RE: MySql with Visual Basic
>=20
> I do the same as Shawn, although I use VBMySQLDirect, and it works =
very
> well. I make my own data-binding arrangements when I need them and =
don't
> miss ADO at all.
>=20
> John Bonnett=20
>=20
> -----Original Message-----
> From: SGreen@unimin.com [mailto:SGreen@unimin.com]=20
> Sent: Friday, 11 March 2005 4:50 AM
> To: James Murphy
> Cc: MySQL Win32 List
> Subject: Re: MySql with Visual Basic
>=20
> I use ADO through MyODBC but I DO NOT use any of the automation (no=20
> querygrids, no data binding, nothing). I am using it strictly as a SQL =
> command conduit (Connections and Recordsets only). All data and schema =
> manipulation statements are composed in code and executed through the=20
> Connection.Execute() and I only use Recordset.Open when I need data =
from
>=20
> the database.
>=20
> I know that I have ignored 90% of what ADO *could* do for me but I =
have=20
> found that if I keep it simple (very simple), it's very stable and I
> don't=20
> have to worry about if a control has created a lock or not or if I =
have
> a=20
> recordset change pending (I never do) or any of the ODBC/ADO problems
> with=20
> DATE, TIME, DATETIME, or TIMESTAMP values. I control every other =
aspect
>=20
> of the data presentation (which works out very well for me when =
building
>=20
> data-driven web pages). This means that if I need to cast a time =
value
> as=20
> a string and back again, I have control over that while I don't have
> that=20
> much influence over a bound control.
>=20
> Based on the range of the responses you are getting, it seems that =
there
>=20
> are MANY ways to hook VB into MySQL and make it work. I don't think =
that
>=20
> any of us will say "my way is BEST" but we all make it work and each=20
> method has its own advantages and disadvantages. My advice is to try=20
> something and see if it works. If it's not what you expected, try=20
> something else. Since we are all actually using MySQL with=20
> VB/VBA/VBScript, any one of our methods may be a nice place to start.
>=20
> Shawn Green
> Database Administrator
> Unimin Corporation - Spruce Pine
>=20
> PS a good place to read up on ADO vs. MySQL is=20
> http://dev.mysql.com/tech-resources/articles/index.html. Here are some
> of=20
> the articles I found useful in getting ADO (and MS Access) to "play
> nice"=20
> with MySQL
>=20
> =
http://dev.mysql.com/tech-resources/articles/migrating-from- microsoft.ht
> ml
> =
http://dev.mysql.com/tech-resources/articles/visual-basic-da tatypes.html
> http://dev.mysql.com/tech-resources/articles/vb-blob-handlin g.html
> =
http://dev.mysql.com/doc/mysql/en/programs-known-to-work-wit h-myodbc.htm
> l
> http://dev.mysql.com/doc/mysql/en/myodbc-with-vb.html
>=20
> Don't forget, all of the lists are archived and searchable:=20
> http://lists.mysql.com/
> As are the forums: http://forums.mysql.com/
>=20
>=20
>=20
> Daniel da Veiga wrote on 03/10/2005 02:17:50
> PM:
>=20
> > I wouldn't use ADO to connect with MySQL, it seems that you'll have
> > more trouble dealing with the objects than really doying any work =
with
> > the database itself. I am using an old version of a standalone =
library
> > called MyVBqL, that later evolved into VBMySQLDirect, wich is still
> > under development I believe... Its a single dll that can be easily
> > registered, solving many problems (VBA for instance, when Word can't
> > find the datasources).
> >=20
> > Hope that helps,
> >=20
> >=20
> > On Thu, 10 Mar 2005 11:52:12 -0500, Lawrence Martin
> > com> wrote:
> > > Inquiry To List:
> > >=20
> > > From: James Murphy [mailto:jameshmurphy@yahoo.com]
> > > Sent: Thursday, March 10, 2005 10:20 AM>=20
> > > To: win32@lists.mysql.com
> > > Subject: MySql with Visual Basic
> > >=20
> > > I am trying to find some information on using Visual Basic with
> MySql.=20
> What
> > > works and what does not. How do I handle a timestamp field.
> > >=20
> > >=20
> =
==================== =====3D=
==================== =====3D=
==================== ==
> =3D
> > > Reply To List: March 10, 2005
> > >=20
> > > I am using VB6 (VS6, Enterprise) with MySQL 4.1.10 and MySQL ODBC=20
> 3.5.11
> > > using XP Pro OS.
> > >=20
> > > Recently I have been 'fooling around' with the Microsoft Active-X
> Data
> > > Objects (ADO) interface using the 'adodc' and 'datagrid' =
components=20
> under
> > > ADO 2.8 Libraries.
> > >=20
> > > Also, I would recommend looking at the ADO samples from Microsoft =
in
>=20
> the
> > > MSDN collection if you have it. The DataObjects Collection object
> that=20
> maps
> > > (links) external database fields to VB components is a very =
powerful
>=20
> concept
> > > and works brilliantly !
> > >=20
> > > As far as a MySQL timestamp field is concerned, I have found that=20
> mapping it
> > > to a VB text field and parsing the various elements as needed =
'works
>=20
> for me'
> > > (ie. working with it as a VB string)
> > >=20
> > > ADO is covered in rich detail in various Microsoft online venues
> (MSDN=20
> et
> > > al), many different VB user groups on the web, and in the =
technical
> > > literature. I could recommend two books that I have; 'Serious=20
> ADO:Universal
> > > Data Access with Visual Basic' by Rob Macdonald and 'ADO Examples
> and=20
> Best
> > > Practices' by William R. Vaughn.
> > >=20
> > > HTH !
> > >=20
> > > Regards,
> > > Larry Martin
> > >=20
> > > --
> > > MySQL Windows Mailing List
> > > For list archives: http://lists.mysql.com/win32
> > > To unsubscribe: http://lists.mysql.com/win32?
> > unsub=3Ddanieldaveiga@gmail.com
> > >=20
> > >=20
> >=20
> >=20
> > --=20
> > Daniel da Veiga
> > Computer Operator - RS - Brazil
> >=20
> > --=20
> > MySQL Windows Mailing List
> > For list archives: http://lists.mysql.com/win32
> > To unsubscribe:
> http://lists.mysql.com/win32?unsub=3Dsgreen@unimin.com
> >=20
>=20
> --=20
> MySQL Windows Mailing List
> For list archives: http://lists.mysql.com/win32
> To unsubscribe: =
http://lists.mysql.com/win32?unsub=3Djohn.cook@bench.com
>=20
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org