Bump version to 6.4.7.2.M8
[LibreOffice.git] / basic / qa / vba_tests / ole_ObjAssignToNothing.vb
blobd68664b41b7294f6471a68a85f9fb37a29eb7674
1 Option VBASupport 1
2 Function doUnitTest(TestData as String, Driver as String) as String
3 Rem Ensure object assignment is by reference
4 Rem when object member is used ( as lhs )
5 Rem This time we are testing assigning with special Nothing
6 Rem keyword
7 Set cn = New ADODB.Connection
8 Dim conStr As String
9 conStr = "Provider=MSDASQL;Driver={" & Driver & "};DBQ="
10 conStr = conStr & TestData & "; ReadOnly=False;"
11 cn.Open conStr
12 Set objCmd = New ADODB.Command
13 objCmd.ActiveConnection = Nothing
14 if objCmd.ActiveConnection Is Nothing Then
15 doUnitTest = "OK" ' no error
16 Else
17 doUnitTest = "Fail - expected objCmd.ActiveConnection be Nothing"
18 End If
19 End Function