Hi Mark,

If you are on Windows the ADO connection could be of use if you have installed the ODBC 3.51 driver for Mysql. I saw the example below and it worked for me. I don't think it needs the pro-version of RB but I am not sure about that.

//start code:
 Dim adodbConnection as new OLEObject( "ADODB.Connection" )
 Dim adodbCommand as new OLEObject( "ADODB.Command" )
 Dim adodbRecordSet as OLEObject
 Dim adodbFields as OLEObject
 Dim adodbField as OLEObject
 Dim connectionString as string
 Dim iter as integer
 Dim fieldCount as integer

 connectionString = "DRIVER={MySQL ODBC 3.51 Driver};"
connectionString = connectionString + "Database=test;" //connect to the catalog 'test' connectionString = connectionString + "UID=ITSME;PWD=mypassword;" //username and password (password in Mysql should be unencrypted)

 adodbConnection.Open( connectionString )

 adodbCommand.ActiveConnection = adodbConnection
adodbCommand.CommandText = "select * from autotest" // 'autotest is a database in the catalog 'test'
 adodbRecordSet = adodbCommand.Execute

 adodbFields = adodbRecordSet.Fields
 fieldCount = adodbFields.Count

 listbox1.ColumnCount = fieldCount

 while not adodbRecordSet.EOF
   adodbFields = adodbRecordSet.Fields
listBox1.addrow "" for iter = 0 to fieldCount-1
     adodbField = adodbFields.Item( iter )
     listBox1.cell(listBox1.listcount-1, iter) = adodbField.Value("Value")
   next
adodbRecordSet.MoveNext
 wend

exception err as OLEException
 msgbox err.message
//end code

HTH

Kind regards,
Andre



Mark Cooke wrote:


On 25 Feb 2006, at 08:36, Tom Benson wrote:

because if you do, you can use the shell tools that MySQL installs to communicate with the database.

see the shell class in the reference manual...


Thats true, but sadly the database is stored on a remote server.

Mark
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to