Search found 18 matches

by multimesut
Mon 18 Jan 2021 12:05
Forum: MySQL Data Access Components
Topic: Linux SQL syntax Problem
Replies: 2
Views: 3009

Linux SQL syntax Problem

Hello, I'm getting an error in the sql below. but there is no problem on the windows side. I got the log below from dbmonitor.

SQL;
select *,(case pin when '0' then 'Etkin Değil' when '1' then 'Etkin' end )as pins,(case timerule when '0' then 'Etkin Değil' when '1' then 'Etkin' end )as time
from company_call_rules u where status=:p_status and deleted=:p_deleted and companyid=:p_companyid

Parameters;
p_status WideString[1] '1'
p_deletes WideString[1] '0'
p_companyid Byte 12

Error;
#42000You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? '1'nd deleted=? '0'nd companyid=?12' at line 2
by multimesut
Wed 13 Jan 2021 11:09
Forum: SecureBridge
Topic: Source Code Error
Replies: 1
Views: 3588

Source Code Error

hello, i can't compile the project in Delphi 10.3. I am getting the following error.

[dcc32 Error] ScCoders.pas(1105): E2003 Undeclared identifier: 'ByteInSet'
[dcc32 Error] ScCoders.pas(1105): E2015 Operator not applicable to this operand type
[dcc32 Fatal Error] ScSMTPClient.pas(677): F2063 Could not compile used unit 'ScCoders.pas'

Delphi : 10.3.3
SecureBridge Version : 9.4.1

Image
by multimesut
Wed 24 Jun 2020 07:58
Forum: SecureBridge
Topic: release of sbridge for delphi 10.4 Sydney
Replies: 6
Views: 4285

Re: release of sbridge for delphi 10.4 Sydney

hello, is there any improvement?
by multimesut
Thu 04 Jun 2020 08:14
Forum: SecureBridge
Topic: oSSHClient.Disconnect bug
Replies: 2
Views: 1789

Re: oSSHClient.Disconnect bug

Thanks for your answer, @ViktorV. I am waiting for news from you.
by multimesut
Mon 01 Jun 2020 08:29
Forum: SecureBridge
Topic: oSSHClient.Disconnect bug
Replies: 2
Views: 1789

oSSHClient.Disconnect bug

Details:

Hello, I just upgraded to pro version to develop linux applications. There is a problem with oSSHClient. The application freezes when disconnect or free. I added the sample project.

I'm waiting for your help. thanks.

Info;
Product Version: 9.2.4
OS Version: Linux
Platform: x64
Delphi: 10.3.3
Is registered user: True

Code;

Code: Select all

program Project1;

{$APPTYPE CONSOLE}

{$R *.res}

uses
  ScSSHClient, ScBridge, ScSSHChannel,
  System.SysUtils;

type
TSSH = class
private
  oSSHClient: TScSSHClient;
  oMemoryStorage: TScFileStorage;
  oSSHShell : TScSshShell;
  procedure ScSSHClientServerKeyValidate(Sender: TObject; NewServerKey: TScKey; var Accept: Boolean);
  procedure Test;
end;

var
SSH: TSSH;


procedure TSSH.ScSSHClientServerKeyValidate(Sender: TObject; NewServerKey: TScKey; var Accept: Boolean);
begin
  Accept := True;
end;

procedure TSSH.Test;
var
  I: Integer;
  x: String;
begin
  for I := 0 to 100 do
    begin
    WriteLN('Create Start - '+IntToStr(i));
    oSSHClient    := TScSSHClient.Create(nil);
    oMemoryStorage  := nil;
    oMemoryStorage := TScFileStorage.Create(nil);
    oSSHClient.KeyStorage := oMemoryStorage;
    oSSHClient.HostName := '127.0.0.1';
    oSSHClient.Port := 22;
    oSSHClient.User := 'root';
    oSSHClient.Password := '123456';
    oSSHClient.HostKeyAlgorithms.AsString:='ssh-rsa,ssh-dss';
    oSSHClient.OnServerKeyValidate := ScSSHClientServerKeyValidate;
    oSSHClient.Connect;
    oSSHShell := TScSshShell.Create(nil);
    oSSHShell.Client:=oSSHClient;
    x:=oSSHShell.ExecuteCommand('date');
    WriteLN('Create Finish - '+IntToStr(i)+' - '+x);
    //
    WriteLN('FreeAndNil Start - '+IntToStr(i));
    oSSHClient.Disconnect;
    FreeAndNil(oSSHClient);
    FreeAndNil(oMemoryStorage);
    FreeAndNil(oSSHShell);
    WriteLN('FreeAndNil Finish - '+IntToStr(i));
    end;
end;

begin
  try
  SSH:=TSSH.Create;
  SSH.Test;
    { TODO -oUser -cConsole Main : Insert code here }
  except
    on E: Exception do
      Writeln(E.ClassName, ': ', E.Message);
  end;
end.
by multimesut
Wed 13 Feb 2019 11:34
Forum: MySQL Data Access Components
Topic: MyQuery CommandTimeout Not Work
Replies: 5
Views: 1701

Re: MyQuery CommandTimeout Not Work

The query return is a single line but sometimes it takes too long because there are calculation operations in it.
by multimesut
Wed 13 Feb 2019 06:26
Forum: MySQL Data Access Components
Topic: MyQuery CommandTimeout Not Work
Replies: 5
Views: 1701

Re: MyQuery CommandTimeout Not Work

hi, but I have to put a period to wait for a long time. sql maybe busy. I should not wait until that time
by multimesut
Sat 09 Feb 2019 12:53
Forum: MySQL Data Access Components
Topic: MyQuery CommandTimeout Not Work
Replies: 5
Views: 1701

MyQuery CommandTimeout Not Work

Hi,

I want to do 5 seconds after close the query. and give an error. but "CommandTimeout" does not work. always set to infinite. The query takes 2 minutes.

Thank You

MyDAC 9.3

Code: Select all

  try
  MyQuery1.CommandTimeout:=5;
  MyQuery1.SQL.Clear;
  MyQuery1.SQL.Add('SELECT * FROM test''');
  MyQuery1.Open;
  except
  showmessage('error');
  end;
by multimesut
Thu 25 Jan 2018 13:50
Forum: SecureBridge
Topic: TScSSHClient.Password Write Only
Replies: 1
Views: 1206

TScSSHClient.Password Write Only

Could you do Password property area just only writable to TScSSHClient component?(or new function SetPassword) I share developers my unites as dcu. It is visible when inserting password inside it. Developers see the password.

Now;
oSSHClient.Password := '123456'
showmessage(oSSHClient.Password);// 123456

Example;
oSSHClient.wPassword := '123456'
showmessage(oSSHClient.Password);// empty

Example2;
oSSHClient.SetPassword('123456');
showmessage(oSSHClient.Password);// empty

Example3;
oSSHClient.Connect('root','123456');
showmessage(oSSHClient.Password);// empty
by multimesut
Thu 07 Dec 2017 17:44
Forum: SecureBridge
Topic: RemoveDirectory - SFTP server error occurred: Failure
Replies: 3
Views: 1614

Re: RemoveDirectory - SFTP server error occurred: Failure

I can not delete the full folder via winscp and I do not get any errors. but I get this error when I delete the full folder with the command RemoveDirectory in SecureBridge component. I delete everything in the folder but it deletes the empty folder. I need you to have a code like the one below.

RemoveDirectory(folder:string;allfiles:boolean)
by multimesut
Thu 07 Dec 2017 14:43
Forum: SecureBridge
Topic: ScHttpWebRequest Example
Replies: 11
Views: 11400

Re: ScHttpWebRequest Example

Thank you for the answer. I will reach the solution. Can it be done at Basic Authorization? the following did not work.

Request := TScHttpWebRequest.Create('https://user:[email protected]/xml');
by multimesut
Mon 04 Dec 2017 12:59
Forum: SecureBridge
Topic: RemoveDirectory - SFTP server error occurred: Failure
Replies: 3
Views: 1614

RemoveDirectory - SFTP server error occurred: Failure

Hi,

I cannot delete a folder full of file and folder. What should I do?

Command;
oSFTPClient.RemoveDirectory('/etc/test');

Error;
Project Project1.exe raised exception class EScSFTPError with message 'SFTP server error occurred: Failure'.
by multimesut
Sat 02 Dec 2017 08:22
Forum: SecureBridge
Topic: ScHttpWebRequest Example
Replies: 11
Views: 11400

Re: ScHttpWebRequest Example

yes, #stlcours. I agree with you. Thanks!
by multimesut
Fri 01 Dec 2017 12:41
Forum: SecureBridge
Topic: ScHttpWebRequest Example
Replies: 11
Views: 11400

Re: ScHttpWebRequest Example

Thank you for the answer. where is this "ScHttpWebRequest" used? can I POST a file to a webpage?
by multimesut
Mon 27 Nov 2017 15:05
Forum: SecureBridge
Topic: ScHttpWebRequest Example
Replies: 11
Views: 11400

ScHttpWebRequest Example

hi, I could not find the example on the internet. how can i use it? is there a sample that makes an xml post on a host? thank you..