I'm using C++ Builder XE, dbExpress (XE package), MSSQL Server 2005. MS SQL Server Management Studio can connect without any problems.
The error message after a 30 seconds is: Project Project1.exe raised exception class TDBXError with message 'SQL State: HYT00, SQL Error Code: 0 Login timeout expired. SQL State: 08001 SQL Error Code: 3. A netword-related or instance-specific error has occured while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance'.
The following parameters are set:
Code: Select all
SQLConnection1->ConnectionName = "MSSQLConnection";
SQLConnection1->DriverName = "MSSQL";
SQLConnection1->GetDriverFunc = "getSQLDriverMSSQL";
SQLConnection1->LibraryName = "dbxmss.dll";
SQLConnection1->VendorLib = "sqlncli10.dll";
SQLConnection1->LoadParamsOnConnect = true;
SQLConnection1->Params->Clear();
SQLConnection1->Params->Add("HostName=domain.net");
SQLConnection1->Params->Add("Database=***");
SQLConnection1->Params->Add("User_Name=***");
SQLConnection1->Params->Add("Password=***");
SQLConnection1->Params->Add("Port=1433");
SQLConnection1->Params->Add("BlobSize=-1");
SQLConnection1->Params->Add("ErrorResourceFile=");
SQLConnection1->Params->Add("LocaleCode=0000");
SQLConnection1->LoginPrompt = false;
Code: Select all
SimpleDataSet1->DataSet->CommandText = "SELECT * FROM pages";
SimpleDataSet1->Active = true;
SQLConnection1->Open();