Einzelnen Beitrag anzeigen

omata

Registriert seit: 26. Aug 2004
Ort: Nebel auf Amrum
3.154 Beiträge
 
Delphi 7 Enterprise
 
#1

SQLConnection.SetOption Zugriff in Delphi 2009?

  Alt 17. Aug 2009, 01:27
Datenbank: MSSQL • Version: 2000 • Zugriff über: dbExpress
Wie kann man zusätzliche Optionen in dem dbExpress von Delphi 2009 setzen?

Mich interessieren dabei folgende Parameter...
Delphi-Quellcode:
const
  coLongStrings = TSQLConnectionOption(101);
  coEnableBCD = TSQLConnectionOption(102);
  coTrimFixedChar = TSQLConnectionOption(103);
  coInternalName = TSQLConnectionOption(201);
  coUseQuoteChar = TSQLConnectionOption(202);
  coCharLength = TSQLConnectionOption(203);
  coFetchAll = TSQLConnectionOption(301);
  coPrepared = TSQLConnectionOption(302);

  SLongStrings = 'LongStrings';
  SEnableBCD = 'EnableBCD';
  SInternalName = 'InternalName';
  SUseQuoteChar = 'UseQuoteChar';
  SFetchAll = 'FetchAll';
  SCharLength = 'CharLength';
  SPrepared = 'Prepared';
  STrimFixedChar = 'TrimFixedChar';
In Delphi 7 ging es noch so...
Delphi-Quellcode:
  if Params.Values[SLongStrings] <> 'then
    SQLConnection.SetOption(coLongStrings, LongInt(UpperCase(trim(Params.Values[SLongStrings])) = 'TRUE'));
  if Params.Values[SEnableBCD] <> 'then
    SQLConnection.SetOption(coEnableBCD, LongInt(UpperCase(trim(Params.Values[SEnableBCD])) = 'TRUE'));
  if Params.Values[SInternalName] <> 'then
    SQLConnection.SetOption(coInternalName, Integer(Params.Values[SInternalName]));
  if Params.Values[SUseQuoteChar] <> 'then
    SQLConnection.SetOption(coUseQuoteChar, LongInt(UpperCase(trim(Params.Values[SUseQuoteChar])) = 'TRUE'));
  if Params.Values[SFetchAll] <> 'then
    SQLConnection.SetOption(coFetchAll, LongInt(UpperCase(trim(Params.Values[SFetchAll])) = 'TRUE'));
  if Params.Values[SCharLength] <> 'then
    SQLConnection.SetOption(coCharLength, StrToInt(trim(Params.Values[SCharLength])));
  if Params.Values[SPrepared] <> 'then
    SQLConnection.SetOption(coPrepared, LongInt(UpperCase(trim(Params.Values[SPrepared])) = 'TRUE'));
  if Params.Values[STrimFixedChar] <> 'then
    SQLConnection.SetOption(coTrimFixedChar, LongInt(UpperCase(trim(Params.Values[STrimFixedChar])) = 'TRUE'));
Das geht jetzt leider nicht mehr, weil es SQLConnection nicht mehr gibt. Aber wie geht es dann?

Hoffe ihr habt da eine Idee zu.
  Mit Zitat antworten Zitat