Datenbank: MSSQL • Version: 2000 • Zugriff über: dbExpress
SQLConnection.SetOption Zugriff in Delphi 2009?
Wie kann man zusätzliche Optionen in dem dbExpress von Delphi 2009 setzen?
Mich interessieren dabei folgende Parameter...
Delphi-Quellcode:
In Delphi 7 ging es noch so...
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';
Delphi-Quellcode:
Das geht jetzt leider nicht mehr, weil es SQLConnection nicht mehr gibt. Aber wie geht es dann?
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')); Hoffe ihr habt da eine Idee zu. |
Alle Zeitangaben in WEZ +1. Es ist jetzt 03:26 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz