Autor Beitrag
Flash106 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 234


D7 Ent
BeitragVerfasst: Do 27.01.05 16:10 
ok also ich hab das myParams jetz created und nun wie soll ich ihm denn nun was zuweisen??

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
...

var myParams : TParam;

myParams := TParam.Create(Self);

...


Moderiert von user profile iconraziel: Code- durch Delphi-Tags ersetzt.
Flash106 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 234


D7 Ent
BeitragVerfasst: Do 27.01.05 16:23 
habs jetz aber wie weise ich TParam jetz der SQLConnection zu??

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
...
  vParams.ParamValues['DriverName'] := 'MSSQL';
  vParams.ParamValues['Hostname'] := 'localhost';
  vParams.ParamValues['Database'] := 'DuB';
  vParams.ParamValues['User_Name'] := 'Bianca';
  vParams.ParamValues['Password'] := ' ';
  vParams.ParamValues['OS_Authentication'] := 'True';
...
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Do 27.01.05 16:26 
so könnts gehen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
var
  Form1: TForm1;
  pms: Tparams;
  pm: tparam;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
  pms := Tparams.Create(self);
  pm := tparam.Create(self);
  pm.Name := 'DRIVER';
  pm.Text := 'MS SQL';
  pms.AddParam(pm);
end;
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Do 27.01.05 16:28 
müsste so gehen
sqlconnection1.Params.Assign(vParams);
Flash106 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 234


D7 Ent
BeitragVerfasst: Do 27.01.05 20:00 
ok alles klar soweit.. bekomme jetz folgenden fehler:

TParams kann nicht zu TStringList zugewiesen werden.

der source:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
  vParams := TParams.Create(Self);

  DriverName := TParam.Create(vParams,ptInput);
  Hostname := TParam.Create(vParams,ptInput);
  Database := TParam.Create(vParams,ptInput);
  User_Name := TParam.Create(vParams,ptInput);
  Password := TParam.Create(vParams,ptInput);
  OS_Authentication := TParam.Create(vParams,ptInput);

  DriverName.Name := 'DriverName'; DriverName.Text := 'MSSQL';
  Hostname.Name := 'Hostname'; Hostname.Text := 'localhost';
  Database.Name := 'Database'; Database.Text := 'DuB';
  User_Name.Name := 'User_Name'; User_Name.Text := '****';
  Password.Name := 'Password'; Password.Text := ' ';
  OS_Authentication.Name := 'OS Authentication'; OS_Authentication.Text := 'true';

  mySQLConnection.Params.Assign(vParams);
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Do 27.01.05 22:38 
64.233.183.104/searc...ion.create&hl=de

mit google gefunden, suchbegriff war TSQLConnection.Create