by xhbcoder » Thu Dec 21, 2006 3:59 pm
I am getting a GPF error. Thanks
********************
function ODBC_update && testing update
********************
local oRdd,afiles,n:=0,cTable,oDbf
oRdd := TRddOdbc():New("rtl_polling", "SA", "*****")
*oRdd := TRddOdbc():New("Northwind", "SA", "*****")
If !oRdd:oOdbc:lSuccess
oRdd:oOdbc:ShowErrorList("ODBC session not successfully initialized, aborting...")
oRdd:End()
return nil
Endif
// oRdd:oOdbc:lAbort := .f.
aFiles := oRdd:oOdbc:GetTables("*", .F. ) && returns all tables
if len(aFiles) == 0
MsgAlert("There are not tables on that database, aborting...",;
"ODBC Table selection")
oRdd:End()
return nil
endif
cTable := "test_jd"
oRdd:oOdbc:lCsrDyn := .t.
alert("here")
USE (cTable) VIA "ODBC" NEW ALIAS "_"+cTable+"_"
oDbf:=oRdd:getTable(cTable)
field->Field3="testxx"
oRdd:Skip(1)
field->Field3="test3"
*field->Field3="test update2"
*do while n <= 10
* n++
* oRdd:oOdbc:append()
* field->field2=n
*enddo
browse()
oRdd:End()
return nil
Last edited by
xhbcoder on Thu Dec 21, 2006 7:02 pm, edited 1 time in total.