Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Product Manuals » Elevate Web Builder 3 Manual » Using Databases » Creating and Loading DataSets |
function CreateStatesDataSet: TDataSet; begin Result:=TDataSet.Create(nil); with Result.Columns.Add do begin Name:='Abbrev'; DataType:=dtString; Length:=2; end; with Result do begin Open; Insert; Columns['Abbrev'].AsString:='CA'; Save; Insert; Columns['Abbrev'].AsString:='FL'; Save; Insert; Columns['Abbrev'].AsString:='NY'; Save; end; end;
<TServerSession.BaseURL>/<TServerSession.DatabasesResource>/<TDatabase.DatabaseName>
Database Name: Production DataSet Name: CustomerOrders Select DataSet Command: SELECT * FROM custord WHERE CustomerID=:CustomerID
procedure TMasterDetailForm.LoadOrders; begin CustomerOrders.Params.Clear; CustomerOrders.Params.Add('CustomerID='+Customer.Columns['CustomerID'].AsString); Database.DatabaseName:='Production'; // Uses the default global Database TDatabase instance Database.LoadRows(CustomerOrders); end;
procedure TProduction.LoadOrders; begin CustomerOrders.Params.Clear; CustomerOrders.Params.Add('CustomerID='+Customer.Columns['CustomerID'].AsString); LoadRows(CustomerOrders); end;
This web page was last updated on Thursday, November 16, 2023 at 10:39 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |