2 ' This file is part of the LibreOffice project.
4 ' This Source Code Form is subject to the terms of the Mozilla Public
5 ' License, v. 2.0. If a copy of the MPL was not distributed with this
6 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 Function doUnitTest(TestData
as String, Driver
as String) as String
11 Rem Ensure object assignment is by reference
12 Rem when object member is used ( as lhs )
13 Rem This time we are testing assigning with special Nothing
15 Set cn
= New ADODB
.Connection
17 conStr
= "Provider=MSDASQL;Driver={" & Driver
& "};DBQ="
18 conStr
= conStr
& TestData
& "; ReadOnly=False;"
20 Set objCmd
= New ADODB
.Command
21 objCmd
.ActiveConnection
= Nothing
22 if objCmd
.ActiveConnection Is
Nothing Then
23 doUnitTest
= "OK" ' no error
25 doUnitTest
= "Fail - expected objCmd.ActiveConnection be Nothing"