Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


Multi-Dimensional SafeArrays are NOT supported

 Keywords:  OLE limitation  Multi Dimension Dimensional Safe Array 1708

Question:

When executing the following code in WinBatch version 2002H, I am receiving error '1249: OLE object: Could not process value returned from object.' I would like to see developer efforts aimed toward ADO Recordset object methods ( i.e. GetRows(), AddNew() ) in terms of array handling.

Answer:

The next release of WinBatch (2002J) will contain improvements the deal with OLE and Arrays. However, multi-dimensional SafeArrays are NOT going to be supported. You will receive the following error: '1708: OLE: Multi-dimensional SAFEARRAY's not supported.' Apparently method GetRows() returns a multi-dimensional SAFEARRAY.
file	= "C:\Temp\sample.mdb" 
tablename 	= "Table1"
query  = "SELECT * FROM %tablename%"
Conn = "Provider=MicroSoft.Jet.OLEDB.4.0; Data Source=%file%;Jet OLEDB:Engine Type=4"
DB = ObjectOpen("ADODB.Connection")
RS =ObjectOpen("ADODB.RecordSet")
DB.Open(Conn)
RS = DB.Execute(query)
array = RS.GetRows()
DB.Close()
ObjectClose(DB)
exit