Board index » delphi » TADOQuery, MS SQL Server and multiple logins

TADOQuery, MS SQL Server and multiple logins

Quote
>I would feel better if I could eliminate the redundant logins, or at least
>better understand what is happening.

Do you have the TadoConnection.KeepConnection property set to true?
--
Brian Bushay (TeamB)
Bbus...@NMPLS.com
 

Re:TADOQuery, MS SQL Server and multiple logins


Quote
> Do you have the TADOConnection.KeepConnection property set to true?

Yes. I set it just after I create the connection, and then don't fiddle with
it again. Is there any way it could be getting reset?

BTW, This is a console application and I'm creating and managing all of the
ADO components by hand. Is it possible there is some other property, of
either the connection or the query object, that I don't know about, that I
should be worrying about?

--
-----------------------------------
George Merriman  g...@gsi-bkln.com
Gravesend Systems, Inc.
Brooklyn New York USA

"Brian Bushay TeamB" <BBus...@Nmpls.com> wrote in message
news:31ek1vkmsbtp96vnj60bgmh8qar4qt7iih@4ax.com...

Quote

> >I would feel better if I could eliminate the redundant logins, or at
least
> >better understand what is happening.
> Do you have the TadoConnection.KeepConnection property set to true?
> --
> Brian Bushay (TeamB)
> Bbus...@NMPLS.com

Re:TADOQuery, MS SQL Server and multiple logins


hello!
  I want to added a lookup field in Adotable when program is running, but
run error.
  Who help me?
 Thanks  for any help

wxy

Re:TADOQuery, MS SQL Server and multiple logins


Quote
>  I want to added a lookup field in Adotable when program is running, but
>run error.

Do it like this
var
  f : TField;
  i : integer;
begin
 table1.FieldDefs.Update
  Table1.Close;
  for i := 0 to Table1.FieldDefs.Count - 1 do
   if table1.FindField(table1.FieldDefs[i].Name) = nil then //persistent field
does not exist
    Table1.FieldDefs.Items[i].CreateField(Table1);
  f := TStringField.Create(Table1);
  f.Name := 'Table1lookup';
  f.FieldName := 'lookup';
  f.DisplayLabel := 'lookup';
  f.fieldKind :=fklookup;  f.Calculated := True;
  f.DataSet := Table1;
  f.lookupDataSet:=table2;
  f.Keyfields:= 'Keyfield1';
  f.LookupKeyfields :=  'Keyfield1';
  f.LookupResultField:= 'ResultField';
  Table1.Open;
end;
--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:TADOQuery, MS SQL Server and multiple logins


How do you wrote the code about added a lookup field in Adotable?
Can you paste the code?
Quote
> hello!
>   I want to added a lookup field in Adotable when program is running, but
> run error.
>   Who help me?
>  Thanks  for any help

> wxy

Other Threads