Can't connect to server task-tut (10061)

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
alphaville

Can't connect to server task-tut (10061)

Post by alphaville » Fri 16 Dec 2005 09:08

Hello together,

I'm beginner in using this components :-(
I have tried to make a global var from typ TMyConnection.

Code: Select all


...
  MyConnection1: TMyConnection;
...
  MyConnection1 := TMyConnection.Create(Self);     { MySql Connect erzeugen    }
  MyConnection1.Name := 'MyConnection1';
  MyConnection1.LoginPrompt := False;              { Kein Anmeldedialog        }
  MyConnection1.Server := 'tast-tut';              { Servername                }
  MyConnection1.Options.Charset := 'utf8';         { utf8 Zeichensatz          }
  MyConnection1.Options.Compress := False;         { Unkomprimiert übertragen  }
  MyConnection1.Options.UseUnicode := True;        { Unicode Einsatz           }
  MyConnection1.ConnectionTimeout := 60;           { Timeout hochsetzen        }
...
    MyConnection1.Username :=  dfName.Text;        { Name übergeben            }
    MyConnection1.Password :=  dfPwd.Text;         { Passwort übergeben        }
    MyConnection1.Database := 'rieker';            { Datenbank                 }
    MyConnection1.Connect;
...
After that I get the error message. If I put the component on the Form and change the properties in designmode it's working fine...

Has anybody an idea??
Thanks for help

Uwe

alphaville

Sorry..

Post by alphaville » Fri 16 Dec 2005 10:21

Sorry, I'm so stupid :-( The servername was wrong...

Post Reply