It connects fine and inserts that data on the first run but will not for a second,
Code:
Option Explicit
Dim cnMySql As New rdoConnection
Dim rdoQry As New rdoQuery
Dim rdoRS As rdoResultset
Private Sub Form_Load()
cnMySql.CursorDriver = rdUseOdbc
cnMySql.Connect = "uid=name;pwd=pass;server=server;driver={MySQL ODBC 3.51 Driver};database=DATA;dsn=;"
End Sub
Private Sub Timer1_Timer()
If B(1) = Base(1) Then
B(1) = 0
Text4(1).Text = Text4(1).Text + 1
cnMySql.EstablishConnection
With rdoQry
.Name = "root"
.SQL = "Insert into user (admin,tester,user2,user3,user4) VALUES ('101','202','303','404','505')"
Set .ActiveConnection = cnMySql
Set rdoRS = .OpenResultset(rdOpenKeyset, rdConcurRowVer)
End With
rdoRS.Close
cnMySql.Close
End If
end sub
I want the data to keep entering "Repeating"
Error I get is the .Name
Object is invalid or not set (It is not set in code)
Last edited by digioz; 02-07-10 at 08:51 PM.
Reason: Please use code tags
Sorry for late replies. I am the most likely person to answer, however it's a voluntary job, and I was in the middle of returning from my vacation. hence the delay.
__________________
Feel free to thank people if they help you by clicking thanks at a post.
=================================
Make it idiot proof and someone will make a better idiot.
=================================
Realise the impotence of proof reading everything you publish