uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, sHintManager, sSkinManager, StdCtrls, sEdit, DBXpress, DB,
DBClient, SimpleDS, SqlExpr, sButton, ExtCtrls, sPanel, sLabel, Grids,
DBGrids, sSkinProvider, ComCtrls, sStatusBar, sGauge, sGroupBox, ImgList,
acAlphaImageList, Buttons, sSpeedButton, Printers, sMemo, URLMon, ShellApi, WinInet,
IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdHTTP, Jpeg,
uMySqlVio, uMysqlCT, uMysqlClient, uMysqlHelpers;
...
private
{ Private declarations }
MySQLClient: TMySQLClient;
MySQLResult: TMysqlResult;
...
procedure TForm1.sButton1Click(Sender: TObject);
var
Com1, Com2, str:string;
OK:boolean;
begin
//----------------------начало-проверки
MySQLClient.Host := '91.200.40.77';
MySQLClient.port := 3306;
MySQLClient.user := 'user';
MySQLClient.password := 'user';
MySQLClient.UnixSocket :=''; <--ЧТО СЮДА ПИСАТЬ???
MySQLClient.Db := 'namedb';
MySQLClient.UseNamedPipe := false;
MySQLClient.UseSSL := false;
MySQLClient.Compress := false;
MySQLClient.TrySockets :=true;
if MySQLClient.Connect then
begin
Showmessage('да');
//MySQLResult := MySQLClient.Query('SELECT products_name FROM os_orders_products where products_model = "'+ sEdit1.Text +'"', True, OK);
//str:=MySQLResult.FieldValueByName('products_name');
end
else
begin
Showmessage('Не удалось подключится к серверу!');
end;
end;