okay, did some further research and investigation and my original assessment was wrong. The Array and UBound functions are supported in TestComplete.
Perhaps some additional information as to what error and/or problem you're actually having would be useful.
One thing that I did find is that commands.length is not supported. According to VBScript reference at
http://msdn.microsoft.com/en-us/library/d0t787hb(v=VS.85).aspx, the length property is only supported on a Match object.
In truth, I'm not sure I understand those two lines as seem to be essentially repeating what the original array declaration is doing.
Additionally, the line setting cmd.CommandType is raising an error for me on cmdText. I don't believe that line is necessary.
so, if you remove those two problematic lines on commands.length and remove the line setting CommandType and you get the following which appears to work fine for me.
Sub Test
Dim i, databaseName, commands, cmd
databaseName = "TestDatabase"
commands = Array("CREATE DATABASE " & databaseName)
Set cmd = ADO.CreateADOCommand
cmd.ConnectionString =_
"Provider=sqloledb;" &
"Data Source=nnnnnn;" & _
"Initial Catalog=KENTEST;" & _
"Integrated Security=SSPI"
i = 0
While i < UBound(commands) + 1
Cmd.CommandText = commands(i)
Call Cmd.Execute
i = i + 1
WEnd
End Sub