forward
global type uo_datastore from datastore
end type
end forward
global type uo_datastore from datastore
end type
global uo_datastore uo_datastore
type variables
string is_sqlerrtext
end variables
forward prototypes
public function long of_retrieve (transaction trans_1, string as_sql, ref string as_errors)
public function integer of_create (string as_sql, ref string as_err)
public function long of_retrieve (string as_sql)
end prototypes
public function long of_retrieve (transaction trans_1, string as_sql, ref string as_errors);create(trans_1.syntaxfromsql(as_sql,"style(type=grid)",as_errors))
settransobject(trans_1)
retrieve()
if len(as_errors)>0 then return -1
return rowcount()
end function
public function integer of_create (string as_sql, ref string as_err);create(sqlca.syntaxfromsql(as_sql,"style(type=grid)",as_err))
settransobject(sqlca)
if len(as_err)>0 then
return -1
end if
return 1
end function
public function long of_retrieve (string as_sql);string ls_err
create(sqlca.syntaxfromsql(as_sql,"style(type=grid)",ls_err))
settransobject(sqlca)
retrieve()
if len(ls_err)>0 then
messagebox('提示',"ds语法错误"+as_sql+'~r~n'+ls_err)
return -1
end if
return rowcount()
end function
on uo_datastore.create
call super::create
TriggerEvent( this, "constructor" )
end on
on uo_datastore.destroy
TriggerEvent( this, "destructor" )
call super::destroy
end on
event dberror;is_sqlerrtext=sqlerrtext
end event