function TAuditDataSet.MoveToBookMarkFromDelta: Boolean; var BmInt: Integer; bm: TBookMark; begin result := False; BMInt := FOldValuesDataSet.FieldByName('BookMark').AsInteger; if not BookmarkValid(@BMInt) then Exit; //error @Bmint setlength(bm, sizeof(Integer)); move(bmint, bm[1], sizeof(Integer)); BookMark := BM; result := True; end;
----------------------------------------------
-
直接价格条件编译就行了 if not BookmarkValid(@BMInt) then Exit; //error @Bmint 去掉@ 就可以了,10.1.2去掉不去掉都可以。 可能限制的严格了 加@是不规范是为了以前版本的
----------------------------------------------
http://delphi.icm.edu.pl/ftp/http://delphi-z.ru
function TAuditDataSet.MoveToBookMarkFromDelta: Boolean; var BmInt: Integer; bm: TBookMark; begin result := False; BMInt := FOldValuesDataSet.FieldByName('BookMark').AsInteger; if not BookmarkValid(IntegerToByte(BMInt)) then Exit; //error @Bmint setlength(bm, sizeof(Integer)); move(bmint, bm[1], sizeof(Integer)); BookMark := BM; result := True; end;
----------------------------------------------
-
with DBGridEh1.DataSource.DataSet do for i := 0 to DBGridEh1.SelectedRows.Count - 1 do begin GotoBookmark(Pointer(DBGridEh1.SelectedRows.Items[i])); with ADOQuery1 do begin Close; SQL.Clear; SQL.Add('INSERT INTO OfficeSystem_PayMoveSalaryTmp'); SQL.Add('(PeopleRecordCoding,cYearMonth)'); SQL.Add('VALUES (:PeopleRecordCoding,:cYearMonth)'); Parameters.ParamByName('PeopleRecordCoding').Value := ADODataSet1.FieldByName('PeopleRecordCoding').Value; Parameters.ParamByName('cYearMonth').Value := ADODataSet1.FieldByName('cYearMonth').Value; ExecSQL; end; end;
----------------------------------------------
DELPHI家园QQ群:186629229
[dcc32 Error] OfficePayMoveTroops.pas(105): E2010 Incompatible types: 'System.TArray<System.Byte>' and 'Pointer'
源代码: with DBGridEh1.DataSource.DataSet do for i := 0 to DBGridEh1.SelectedRows.Count - 1 do begin GotoBookmark(Pointer(DBGridEh1.SelectedRows.Items[i])); with ADOQuery1 do begin Close; SQL.Clear; SQL.Add('INSERT INTO OfficeSystem_PayMoveSalaryTmp'); SQL.Add('(PeopleRecordCoding,cYearMonth)'); SQL.Add('VALUES (:PeopleRecordCoding,:cYearMonth)'); Parameters.ParamByName('PeopleRecordCoding').Value := ADODataSet1.FieldByName('PeopleRecordCoding').Value; Parameters.ParamByName('cYearMonth').Value := ADODataSet1.FieldByName('cYearMonth').Value; ExecSQL; end; end;
----------------------------------------------
DELPHI家园QQ群:186629229