I've been testing the IBM OLE Provider for DB2 (on Win2K). I'm getting an error from the Command object, which can be demonstrated with the vbscript that follows. Could someone else try the script and tell me if they get an error when getting the value for 'IsLong Minimum Length'. This is the 33rd property of the command object. The counter (i) starts at 30, so you can see what should happen. (Although this seems an obscure error, I think it's causing me problems with what I'm really trying to do.)
Thanks
Martyn
Thanks
Martyn
Code:
option explicit
dim cn, cmd, i, e
set cn = createObject("ADODB.Connection")
cn.provider = "IBMDADB2"
cn.Properties("User ID").Value = "???"
cn.Properties("Password").Value = "???"
cn.Properties("Data Source").Value = "databasename"
cn.open
set cmd = createObject("ADODB.Command")
cmd.ActiveConnection = cn
on error resume next
i = 30
do while i < cmd.properties.count
wscript.echo cmd.properties(i).name & ", " & cmd.properties(i).value
if err then
for each e in cn.errors
wscript.echo "Error getting value for " & _
cmd.properties(i).name & vblf & vblf & _
"Error Details: " & vblf & _
"Number: " & e.number & vblf & _
"Desc: " & e.description & vblf & _
"Source: " & e.Source & vblf & _
"NativeError: " & e.NativeError & vblf & _
"SQLState: " & e.SQLState
next
wscript.quit(1)
end if
i = i + 1
loop
cn.close
set cn = nothing
wscript.echo "OK"