Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to start MySQL server from Visual Basic

Status
Not open for further replies.

marklenel

Technical User
Aug 29, 2003
46
GB
Hi all,

I'm developing a system in MSExcel that uses VBA and Excel forms for the front end, whilst using a MySQL server local to each machine to process the data in the background.

On starting up the Excel system I want to:-

a) (if necessary) check whether or not the MySQL server is running on the machine
b) (if necessary) start the server

If anyone can suggest VB(A) code to help do this I'd be muchly grateful.
 
ODBC is your friend. Download the MySQL ODBC 3.51 driver and set up a dsn to the database. Add the ADO references and connection strings to your VBA code and you're good to go.


 
Many thanks sostek. I've got the ODBC drivers and am implementing healthy connection strings to the MySQL server when it's running . I need a way of ensuring that it's up and running and accepting connections in order to avoid nasty nasty error messages filtering back into the VBA.

Since posting this I think I have the thing correctly working with the

[tt]Shell("C:/mysql/bin/mysqld.exe -u root")[/tt]

command.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top