Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ADO,DAO,RDO What category is this?

7 views
Skip to first unread message

Henning

unread,
Nov 9, 2006, 1:45:19 PM11/9/06
to
Hi all

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.


Max Kudrenko

unread,
Nov 14, 2006, 12:51:21 PM11/14/06
to
Henning,

It looks like the old DAO way:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/html/vbconrdocomparedtomicrosoftjet.asp

Hope this helps,

Max Kudrenko
Brainbench MVP Program for Visual Basic
www.brainbench.com

Henning

unread,
Nov 16, 2006, 7:10:22 PM11/16/06
to
Thanx for the link, most likely it is DAO without JET loaded. The reason for
asking is that CreateWorkspace relies on MSRDO20.DLL. If installed on a
computer without Office, I get error like: "Can't open DLL file ????????.??"
wich in reality is msrdo20.dll!? P&D does not include the dll in the setup
package.

/Henning

"Max Kudrenko" <vb_...@hotmail.com> skrev i meddelandet
news:1163526681.5...@b28g2000cwb.googlegroups.com...

Max Kudrenko

unread,
Nov 17, 2006, 12:49:12 PM11/17/06
to
Henning,

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

unread,
Nov 17, 2006, 5:57:43 PM11/17/06
to
Yepp, thats what I've done now. If you don't belive it, just try using
CreateWorkspace, and run it on a computer without Ofice.
http://support.microsoft.com/kb/260369

/Henning

"Max Kudrenko" <vb_...@hotmail.com> skrev i meddelandet

news:1163785752.0...@h48g2000cwc.googlegroups.com...

0 new messages