AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Datenbanken Delphi SQL Abfrage auf Access .mdb
Thema durchsuchen
Ansicht
Themen-Optionen

SQL Abfrage auf Access .mdb

Ein Thema von alphaflight83 · begonnen am 6. Aug 2008 · letzter Beitrag vom 6. Aug 2008
 
Benutzerbild von alphaflight83
alphaflight83

Registriert seit: 5. Jun 2008
Ort: Würzburg
148 Beiträge
 
Delphi 12 Athens
 
#11

Re: SQL Abfrage auf Access .mdb

  Alt 6. Aug 2008, 10:40
Ich hoffe doch, wird halt zur Laufzeit definiert, so dass das Programm verschoben werden kann.

Delphi-Quellcode:

DB_Path := ExtractFilePath(ParamStr(0)) + 'DATA';

ADOConnectionStringStandard := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + DB_Path +
                                 '\Database.mdb;Persist Security Info=False';

(* ADOTableClients: Definition of 'ConnectionString' and 'Table' *)
with ADOTableClients do begin
  try
    ConnectionString := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + DB_Path +
                        '\Database.mdb;Persist Security Info=False';
    TableName := 'Clients';
    Active := True;
  except
   ShowMessage('The database Database.mdb could not be found in the current directory '
                + #10#13 + DB_Path)
  end;
end;

ADOQueryClients. ConnectionString := ADOConnectionStringStandard;
Datasource von ADOQueryClients ist DataSourceClients, die per DataSet wiederum auf ADOTableClients verweist.

Ich suche ja schon ne Weile, von daher kann es fast nur ein kleiner oder besonders dämlicher Fehler sein,
der mir nicht auffällt.
Make me a sandwich! - What? Make it yourself. - Sudo make me a sandwich! - Okay
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 08:25 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz