![]() |
Microsoft SQL Server Login
Hallo,
habe folgendes Problem. Ich benutze die ADOConnection Komponente um zum SQL Server zu Connecten. Den String übergebe ich im Quelltext und lasse den User Username und PW über 2 Edit Felder eintragen. Der String sieht so aus:
Delphi-Quellcode:
usw. ist nur ein ausschnitt. Wenn er sich als user sa ohne pw anmeldet funktioniert. Sobald ein PW ins Spiel kommt nicht mehr, da ich nicht finden kann wie das in den String hier eingebaut werden muss. Weiss das vielleicht jemand ?
ConnectionString := 'Provider=SQLOLEDB;' +
'Persist Security Info=False' +';'+ 'User ID=' +Edit1.Text +';'+ 'Initial Catalog=' +ComboBox2.Text +';'+ 'Data Source=' +ComboBox1.Text +';'+ 'Use Procedure for Prepare=1' +';'+ 'Auto Translate=True' +';'+ 'Packet Size=4096' +';'+ 'Workstation ID=' +';'+ 'Use Encryption for Data=False' +';'+ 'Tag with column collation when possible=False' end; try Connected := true; Gruss Budda |
Re: Microsoft SQL Server Login
Hallo,
ist auch für den User "sa" auch ein Password hinterlegt ? Du kannst doch einen Verbindunszeichenkette mit ADOConnection (rechte Maustaste) selber zusammenbauen - funktioniert dann die Anmeldung (connected = True)
Delphi-Quellcode:
ConnectionString := 'Provider=SQLOLEDB;' +
'Persist Security Info=False' +';'+ 'User ID=' +Edit1.Text +';'+ 'Password=' +EditPWD.Text +';'+ 'Initial Catalog=' +ComboBox2.Text +';'+ 'Data Source=' +ComboBox1.Text +';'+ |
Alle Zeitangaben in WEZ +1. Es ist jetzt 19:18 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