What bastard is this? I connect to a MySQL database.
Sub SwitchQueMode()
Dim wrkODBC As Workspace
Dim conn As Connection
Dim rs As Recordset
Dim strSQL As String
Dim tmp As Byte
Dim strtmp$
strSQL = "SELECT kundmode FROM settings"
Set wrkODBC = CreateWorkspace("", "", "", dbUseODBC)
Set conn = wrkODBC.OpenConnection("", , , _
"ODBC;DATABASE=skidata;UID=" & SetUp.Dator &
";PWD=bydalen;DSN=MyODBC3")
Set rs = conn.OpenRecordset( _
strSQL, dbOpenDynamic)
tmp = rs.Fields(0)
If tmp > 0 Then
tmp = 0
Else
tmp = 1
End If
strSQL = "UPDATE settings SET kundmode=" & tmp & ";"
conn.Execute "START TRANSACTION;"
conn.Execute strSQL
conn.Execute "COMMIT;"
rs.Close
conn.Close
wrkODBC.Close
End Sub
/Henning
--
Time is present only to prevent everything from happening at once.
Still it seems that everything happens at once.
Then there must be a bug in time.
To find the bug in time, isn't that what we all hope for.
It looks like the old DAO way:
Hope this helps,
Max Kudrenko
Brainbench MVP Program for Visual Basic
www.brainbench.com
/Henning
"Max Kudrenko" <vb_...@hotmail.com> skrev i meddelandet
news:1163526681.5...@b28g2000cwb.googlegroups.com...
Why would DAO rely on RDO? DAO would be referencing a file like
DAO350.DLL so your reference to MSRDO20.DLL seems suspicious. How do
you know it's definitely this file which causes problems? Also, if you
feel it is, add it to your installation explicitly with P&D Wizard.
This article (http://support.microsoft.com/kb/213846) might be helpful
as well.
/Henning
"Max Kudrenko" <vb_...@hotmail.com> skrev i meddelandet
news:1163785752.0...@h48g2000cwc.googlegroups.com...