Jump to content

Search the Community

Showing results for tags 'dataset'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • uniGUI Public
    • Announcements
    • General
    • Feature Requests
    • Installation
    • Deployment
    • Other Platforms
  • Licensing
    • Licensing
    • Ordering uniGUI
  • Bug Reports
    • Active Reports
    • Closed Reports
    • Old Bug Reports
  • uniGUI Development
    • General Development
    • uniGUI Releases & Roadmaps
    • Utilities
  • Mobile Platform
    • uniGUI Mobile
    • Mobile Browsers
  • Users Area
    • Sample Projects
    • Components and Code Samples
    • Third Party Components
  • Non-English
    • Non-English
  • Miscellaneous
    • Hosting
    • Server Security
    • Jobs

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 1 result

  1. There is a form on which there is a TvirtualTable (Unidac package) or Tfdmemtable (FireDAC package)(tried both). uniDBCheckBox components bound to DataSource: When changing the DataSource, I try to edit adjacent records in the same DataSet (code onAfterEdit): procedure TUFrameTreeRulesF.FFrmStructVTableAfterEdit(DataSet: TDataSet); procedure MainUpd; procedure UpdateRefresh(aIsEnabled, aIsNotifyInface, aIsNotifyEMail: Boolean; aParentStr: string); var lvq: TVirtualQuery; /// throught query (localSQL) lwherestr: string; const CDefUpdateParentStr : string = 'UPDATE source SET %s WHERE (idname=:pname OR idname LIKE :pname2) OR id=:pname;'; begin lwherestr := EmptyStr; lvq := TVirtualQuery.Create(nil); try lvq.SourceDataSets.Add(FFrmStruct.VTable, 'source'); if FIsEnabledChange then begin lwherestr := lwherestr + 'isEnabled = :pIsEnabled'; end; if FIsNotifyInfaceChange then begin lwherestr := ifthen(lwherestr.IsEmpty, EmptyStr, ',') + 'IsEnableNotifyInface =:pIsEnableNotifyInface'; end; if FIsNotifyEMailChange then begin lwherestr := ifthen(lwherestr.IsEmpty, EmptyStr, ',') + 'IsEnabledNotifyEmail=:pIsEnabledNotifyEmail'; end; if not lwherestr.IsEmpty then begin lvq.sql.Text := Format(CDefUpdateParentStr, [lwherestr]); lvq.ParamByName('pname').AsString := aParentStr; lvq.ParamByName('pname2').AsString := aParentStr + '%'; if FIsNotifyEMailChange then lvq.ParamByName('pIsEnabledNotifyEmail').AsBoolean := aIsNotifyEMail; if FIsNotifyInfaceChange then lvq.ParamByName('pIsEnableNotifyInface').AsBoolean := aIsNotifyInface; if FIsEnabledChange then lvq.ParamByName('pIsEnabled').AsBoolean := aIsEnabled; lvq.Prepare; try lvq.Execute; except on e: exception do lwherestr := e.message; /// check end; end; finally if Assigned(lvq) then lvq.Destroy; lvq := nil; end; end; var lubookmark: TBookmark; lparentid: string; begin FFrmStruct.VTable.AfterEdit := nil; lubookmark := FFrmStruct.VTable.Bookmark; FFrmStruct.UDbBuissnesObjectTree.BeginUpdate; FFrmStruct.VTable.DisableControls; FIsChangeSel := True; if not FFrmStruct.VTable.FieldByName('idname').AsString.IsEmpty then lparentid := FFrmStruct.VTable.FieldByName('idname').AsString else lparentid := FFrmStruct.VTable.FieldByName('id').AsString; FFrmStruct.VTable.edit; UpdateRefresh(UDBChBox.Checked, UDBCBNotifyInface.Checked, UDBCheckBoxNotifyEmail.Checked, lparentid); FFrmStruct.VTable.post; FFrmStruct.UDbBuissnesObjectTree.Refresh; FFrmStruct.VTable.EnableControls; FFrmStruct.UDbBuissnesObjectTree.EndUpdate; FFrmStruct.VTable.AfterEdit := FFrmStructVTableAfterEdit; if Assigned(lubookmark) then FFrmStruct.VTable.GotoBookmark(lubookmark); self.hidemask; end; begin self.ShowMask('Обновляю данные...'); FIsEnabledChange := not FFrmStruct.BeforeIsEnabledChange = UDBChBox.Checked; FIsNotifyInfaceChange := not FFrmStruct.BeforeisNotifyChange = UDBCBNotifyInface.Checked; FIsNotifyEMailChange := not FFrmStruct.BeforeIsNotifyEmail = UDBCheckBoxNotifyEmail.Checked; MainUpd; UBtnApplySetting.Enabled := True; end; After I get the error : "DataSet not in Edit or Insert mode" =( At the same time, after the error occurred, the DataSet was updated (as expected, the code above worked (it works)). I have an error happening in the UniDbCheckBox.pas module: I quickly corrected this via a "crutch" (hack): Version: 1.90.0.1564
×
×
  • Create New...