I can't import binary data from MySQL into EXCEL by VBA
hi,
I got some problems to read binary data when I wish to import data from MySQL by using excel-vba.
There is only one column in Table, and the data type is binary.
Following is my code
Private Sub DataUpdate()
Dim oConn As ADODB.Connection
Dim myRS As ADODB.Recordset
Dim mySQL As String
Dim LastR As Long
Set oConn = New ADODB.Connection
Set myRS = New ADODB.Recordset
oConn.Open "DRIVER={MySQL ODBC 5.2a Driver};" _
& "SERVER=localhost;" & "DATABASE=test;" & "USER=root;" _
& "PASSWORD=XXXXXXX;" & "Option=3"
mySQL = "select * from test "
myRS.Open mySQL, oConn
With Worksheets(1)
.Range("A6").CopyFromRecordset myRS
myRs.Close
Set myRs = Nothing
oConn.Close
Set oConn = Nothing
End Sub
the result shows nothing but blank. please help me!!
Subject
Views
Written By
Posted
I can't import binary data from MySQL into EXCEL by VBA
3674
June 19, 2013 09:54AM
1613
July 14, 2013 08:50AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.