desperate need your help please!
Hi all
I have tried a few days to connect mysql database using vb6, but there is no any progress, many people have offered help by providing links, and so on, however, having been tried all of them, nothing works, could anyone help please. I have odbc 3.51 driver downloaded and have checked Microsoft Remote Data Oject 2.0 in reference, here is my code:
Dim mConn As New rdoConnection
Dim rdoQry As New rdoQuery
Dim rdoRS As rdoResultset
mConn.CursorDriver = rdUseOdbc
mConn.Connect = "uid=myid;pwd=mypw;server=localhost;driver={MySQL ODBC 3.51Driver};database=mydb;dsn='';"
mConn.EstablishConnection
With rdoQry
.Name = "SelectAddress"
.Sql = "select * from address"
.RowsetSize = 1
Set .ActiveConnection = mConn
Set rdoRS = .OpenResultset(rdOpenKeyset, rdConcurRowVer)
End With
Do Until rdoRS.EOF
With rdoRS
txtBox.Text="my test"
rdoRS.MoveNext
End With
Loop
End Sub
The error message: Run-time error '91': Object variable or With block variable not set
Has anyone got any idea about what it is going wrong here, I have been looked at the web site, it seems that many people have samiliar problem, but there is no good solution. Help please, it is very urgent
Claire
Re: desperate need your help please!
You might have better luck getting an answer in the Database forum. Post what error(s) you're getting and where it occurs, that'll help people track it down.