CLOSE DATABASES ALL CLEAR customerid='ALFKI' LOCAL oCA as CursorAdapter oCA=CREATEOBJECT("CursorAdapter") oCA.SelectCmd="select * from Northwind..Orders where customerID = ?m.customerid" ?"ODBC" oCA.DataSourceType="ODBC" oCA.DataSource=SQLCONNECT("localServer") IF oCA.DataSource<1 ?"Failed to connect." ELSE ?oCA.CursorFill() LIST customerid='HILAA' oCA.CursorRefresh() LIST USE SQLDISCONNECT(oCA.DataSource) ENDIFYou can use object property instead of memvar. This is an example with ADO:
CLOSE DATABASES ALL CLEAR customerid='ALFKI' LOCAL oCA as CursorAdapter oCA=CREATEOBJECT("CursorAdapter") oCA.AddProperty("customerid",'ALFKI') oCA.SelectCmd="select * from Northwind..Orders where customerID = ?this.customerid" ?"ADO" LOCAL oConn as ADODB.Connection, oRS as ADODB.Recordset, oCom as ADODB.Command oConn=CREATEOBJECT("ADODB.Connection") oConn.Open("Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Data Source=(local)") oRS = CREATEOBJECT("Adodb.RecordSet") oRS.ActiveConnection = oConn oCom = CREATEOBJECT("Adodb.Command") oCom.ActiveConnection = oConn oCA.DataSourceType="ADO" oCA.DataSource=oRS ?oCA.CursorFill(,,,oCom) LIST oCA.customerid='HILAA' oCA.CursorRefresh() LIST USEThanks,