Query := TSQLQuery.Create(nil); try Query.SQLConnection := SQLConn; Query.SQL.Text := 'SELECT * FROM Customers WHERE Country = :Country'; Query.Params.ParamByName('Country').AsString := 'USA'; Query.Open;
// Demonstrates dbExpress connection (Architect edition feature) uses DBXDataSnap, DBXCommon, SqlExpr, DB, DBClient, Datasnap.DBClient, SimpleDS; Embarcadero Delphi XE Architect Mini 15.0.3890.34076-CORE
DataSetProvider := TDataSetProvider.Create(nil); ClientData := TClientDataSet.Create(nil); try DataSetProvider.DataSet := Query; ClientData.SetProvider(DataSetProvider); ClientData.Open; Query := TSQLQuery
procedure QueryDatabaseUsingDBX; var SQLConn: TSQLConnection; Query: TSQLQuery; DataSetProvider: TDataSetProvider; ClientData: TClientDataSet; begin // Using dbExpress connection (supports multiple databases) SQLConn := TSQLConnection.Create(nil); try SQLConn.DriverName := 'MSSQL'; // Example: Microsoft SQL Server SQLConn.GetDriverFunc := 'getSQLDriverMSSQL'; SQLConn.LibraryName := 'dbxmss.dll'; SQLConn.VendorLib := 'oledb'; SQLConn.Params.Values['HostName'] := 'localhost'; SQLConn.Params.Values['Database'] := 'TestDB'; SQLConn.Params.Values['User_Name'] := 'user'; SQLConn.Params.Values['Password'] := 'pass'; SQLConn.LoginPrompt := False; SQLConn.Open; For legitimate use, consider a modern Community Edition
// Work with data in-memory (CDS feature) ClientData.First; while not ClientData.Eof do begin ShowMessage(ClientData.FieldByName('CustomerName').AsString); ClientData.Next; end; finally ClientData.Free; DataSetProvider.Free; end; finally Query.Free; end; finally SQLConn.Free; end; end; β οΈ : The version you mentioned is not a legitimate release . CORE was a warez group. Using unlicensed software violates Embarcaderoβs EULA. For legitimate use, consider a modern Community Edition (free for qualifying developers) or a licensed version of Delphi 11/12 Alexandria.