|
Thanks a lot for the help.
|
|
|
|
|
Hi.
I try to use old code from D4 in DXE3 :
mbyte: array [0..1] of char;
mword: array [0..1] of char;
x1: byte;
Inc(i,1);
StrPCopy(mbyte,copy(s,i,1));
x1 := lo(word(mbyte)); E2089 Invalid typecast here
Any suggestion ?
|
|
|
|
|
Only a guess, but it looks like you are trying to cast an array to a word, which makes little sense in C/C++. Does Delphi have the same rule?
|
|
|
|
|
I am trying to loadXML(widestring) using following LOC:
TDomDocument.DefaultInterface.loadXML(WideString(XMLText));
There is a parsing error(symbol and message in subject) which is thrown while above code tries to parse string in to XMLDOMDocument. Need help. 
|
|
|
|
|
What is in the XMLText, and where does the error occur? If you want help here then you need to provide full details of the issue.
|
|
|
|
|
Hi Richard,
My apologies, however I couldn't find a way to attach the PIC of the symbol in here. This symbol is read from SQL database as string and we are trying to save it in XML config file.
That symbol looks like o+ in sql server and looks like 'º' when copied to notepad. When I am trying to loadXML with that symbol in the widestring an exception is thrown with parsing error.
HTH.
|
|
|
|
|
|
Thanks for the advise and suggestions.
|
|
|
|
|
Hi All!
I created a testing project in which on server side there is SQLConnection component with MSSQL driver. I am using data snap server components to make it as server application.
On client side i dropped one SQLConnection with data snap driver, also I dropped TSqlQuery on the client side, and execute a query on the db of the client side that is connected with the server one.
but this operation gave me an error
"dbx.sql in an unrecognized command type"
Please note: TSqlQuery is connected to SQLConnection which is available in client side, which is using datasnap driver to connect to server applicatkon.
I am using Delphi XE6.
My objective is to Execute SQL query using TSQLQuery in the data snap client application.
So how can i do that?
Thanks in Advance.
|
|
|
|
|
Please show your code, especially the SQL statement that causes the error.
|
|
|
|
|
Thank you for your quick response.
I have the sample project, but there is no option available to include attachment. so i explain my project here.
I created server application with two units
1. MainForm
2. TDSServerModule1
On TDSServerModule1 i dropped TSQLConnection and added parameters to connect to SQL Server database "master" (using MSSQL driver)
On mainform I dropped TDSServer, TDSTCPServerTransport, TDSServerClass and connected them with TDSServer.
I added the following code in the OnGetClass event of the TDSServerClass
PersistentClass := TDSServerModule1;
Next I created client application with Only one form
i dropped TSQLConnection connected to server application (using DataSnap driver)
i right clicked and generated 'Client Classes' using 'Generate Datasnap Client Classes' menu
i dropped TDSProviderConnection component and connected to TSQLConnection
i dropped TSqlQuery component and connected to TSQLConnection. I write the following query
Select * from sysdatabases
when i open the query, it is throwing that error.
here is my client side application code:
unit Dsc01Main;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Data.DBXDataSnap,
IPPeerClient, Data.DBXCommon, Data.DB, Data.SqlExpr, Dsc01ServerClasses,
Datasnap.DBClient, Datasnap.DSConnect, Data.FMTBcd;
type
TForm1 = class(TForm)
SQLConnection1: TSQLConnection; //it is using datasnap driver
DSProviderConnection1: TDSProviderConnection;
SQLQuery1: TSQLQuery;
btOpen: TButton;
procedure FormCreate(Sender: TObject);
procedure SQLConnection1AfterConnect(Sender: TObject);
procedure SQLConnection1BeforeDisconnect(Sender: TObject);
procedure btOpenClick(Sender: TObject);
private
{ Private declarations }
FTestServerClient : TDSServerModule1Client;
public
{ Public declarations }
property TestServerClient : TDSServerModule1Client read FTestServerClient;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.btOpenClick(Sender: TObject);
begin
With SQLQuery1 do begin
Close;
SQL.Text := 'Select * from sysdatabases';
Open; //this is throwing error
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
SQLConnection1.Open;
end;
procedure TForm1.SQLConnection1AfterConnect(Sender: TObject);
begin
FTestServerClient := TDSServerModule1Client.Create(SQLConnection1.DBXConnection);
end;
procedure TForm1.SQLConnection1BeforeDisconnect(Sender: TObject);
begin
FreeAndNil(FTestServerClient);
end;
end.
|
|
|
|
|
Open;
What do you expect this command to do, and what error do you see? Also please use <pre> tags around your code, so it is readable; as I have done here.
|
|
|
|
|
I want to select all rows from table "sysdatabases" which is exist in master database.
When i execute the Open command, it is throwing the following error
"Remote error: Dbx.SQL is an unrecognized command type."
My objective is to create multi tier data snap application. But i want to add TSqlQuery in the client application and to execute select, insert, update, and delete commands directly from the client application.
Usually we put tsqlconnection (dbconnection) and tsqlquery on the server side, and clientdataset on the client side.
But I want to use database connection on the server side, but TSqlQuery on the client side of the datasnap multi tier application.
The reason behind is i created one sample application using TMS workflow studio component, when I use that component in the multi tier datasnap application it throws the same error. It seems that they are executing the query on the client side.
So I want to make sure the possibility to use TSQLQuery in the client application of the multi tier datasnap application
Is there any way to send my sample project to you thru email. my email id is askfaridh@gmail.com
|
|
|
|
|
Member 11753159 wrote: Is there any way to send my sample project to you thru email. No.
|
|
|
|
|
no , you https://kodi.software/ & https://luckypatcher.cam/ & https://nox.tips/ cant
modified 25-Dec-19 17:44pm.
|
|
|
|
|
Hi all,
I am using FastReport VCL 5 to export PDF report file with Delphi source code.
FastReport VCL 5 has Compression function.
I want ask about this function as below:
When i use this function to compress report file, what will be compressed?
Exp: Compress font, image or what?
Code:
frxPDFExport.Compressed := False;
Thanks for your support.
|
|
|
|
|
Not a FastReport user... Have you tried to contact their support or open a ticket with them regarding your questions?
Can you type in the prototype of this Compression function?
A quick search give me this[^], although it looks like not being related to your function.
|
|
|
|
|
Hello guys, i'm trying about two weeks to recover some information from three very important files built in QRP extension. I need a way to open it and see the content.
Here`s a part of the file that i opened through EXCEL.
"€
B-,2Lÿÿÿÿÿÿÿÿ°SOUSA & ABREU COMERCIO DE PECAS LTDA.
K%
€%%Ld-:BJ-:!ð€?€?%TP-:AI
BU%
B-:+Lÿÿÿÿÿÿÿÿ¤WinSAC - Sistema de Administração Comercialÿÿ
K%Ld-IY-IÖ!ð€?€?%T-IX
"
As you can see, the information is in the file, but i couldn't find any program that can reads it completely. If anyone can help me i would apreciate a lot!
Thanks in advance,
Matheus
|
|
|
|
|
What is a QRP file and why do you think Excel can read it?
|
|
|
|
|
hi,
When I program tapi3 in delphi 7 using the code below, I can make a
outgoing call, but I can't catch any events. Has anybody face the same
problem ?
Wensheng
unit Unit10;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls,
Forms,
Dialogs, TAPI3Lib_TLB, StdCtrls, ActiveX, ComObj, OleServer;
{
type
TTapiEventsSink = class( TObject, IConnectionPointContainer, I)
procedure TAPI1Event(ASender: TObject; TapiEvent: TOleEnum;
const pEvent: IDispatch);
end;
}
type
TForm1 = class(TForm)
ComboBox1: TComboBox;
Button1: TButton;
Button2: TButton;
Edit1: TEdit;
Button3: TButton;
Edit2: TEdit;
Button4: TButton;
TAPI1: TTAPI;
Memo1: TMemo;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure TAPI1Event(ASender: TObject; TapiEvent: TOleEnum;
const pEvent: IDispatch);
private
{ Private declarations }
public
{ Public declarations }
tapi3 : ITTAPI;
addr : ITAddress;
media : ITMediaSupport;
addrs : IEnumAddress;
term : ITTerminal;
terminalSupport : ITTerminalSupport;
basicall :ITBasicCallControl;
dir : TOleEnum;
streamControl : ITStreamControl;
enumStream : IEnumStream;
stream : ITStream;
mediatype : Integer;
direct : TERMINAL_DIRECTION;
lAddressType : Integer;
bHold : Boolean;
event : ITCallNotificationEvent;
tapievent : ITTAPIEventNotification;
unknown : IUnknown;
end;
const TAPI3_CALL_EVENTS =
TE_CALLMEDIA OR
TE_CALLNOTIFICATION OR
TE_CALLSTATE;
const
TAPIMEDIATYPE_AUDIO = $8;
TAPIMEDIATYPE_VEDIO = $8000;
TAPIMEDIATYPE_DATEMODEM = $10;
TAPIMEDIATYPE_G3FAX = $20;
LINEADDRESSTYPE_PHONENUMBER = $00000001;
EVENT_FILTER =
TE_TAPIOBJECT OR
TE_ADDRESS OR
TE_CALLNOTIFICATION OR
TE_CALLSTATE OR
TE_CALLMEDIA OR
TE_CALLHUB OR
TE_CALLINFOCHANGE OR
TE_PRIVATE OR
TE_REQUEST OR
TE_AGENT OR
TE_AGENTSESSION OR
TE_QOSEVENT OR
TE_AGENTHANDLER OR
TE_ACDGROUP OR
TE_QUEUE OR
TE_DIGITEVENT OR
TE_GENERATEEVENT;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
var
lwCeltFetched : Cardinal;
cookievar : Integer;
begin
bHold := false;
tapi1.Initialize;
tapi1.Connect;
{ Select an address }
// list address
addrs := tapi1.DefaultInterface.EnumerateAddresses;
//addrs := tapi3.EnumerateAddresses;
while ( S_OK = addrs.Next(1,addr,lwCeltFetched) ) do
begin
ComboBox1.Items.Add(addr.AddressName);
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
basicall.Disconnect(DC_NORMAL);
end;
procedure TForm1.Button2Click(Sender: TObject);
var
lwCeltFetched : Cardinal;
iRes : Integer;
i : Integer;
hr : Integer;
begin
{ Select an address }
addrs.Reset;
while ( S_OK = addrs.Next(1,addr,lwCeltFetched) ) do
begin
hr := addr.QueryInterface(IID_ITMediaSupport,media);
if ( true = media.QueryMediaType(TAPIMEDIATYPE_AUDIO) ) then
break;
end;
tapi1.EventFilter := EVENT_FILTER;
tapi1.RegisterCallNotifications(addr,true,false,TAPIMEDIATYPE_AUDIO,1);
end;
procedure TForm1.Button3Click(Sender: TObject);
var
phonenum : array [0..30] of char;
begin
lAddressType := LINEADDRESSTYPE_PHONENUMBER;
StrPCopy( phonenum, Edit1.Text );
basicall :=
addr.CreateCall(phonenum,lAddressType,TAPIMEDIATYPE_AUDIO);
basicall.Connect(false);
end;
procedure TForm1.TAPI1Event(ASender: TObject; TapiEvent: TOleEnum;
const pEvent: IDispatch);
var
callinfo : ITCallInfo;
event : ITCallNotificationEvent;
begin
Memo1.Lines.Add('hi');
Memo1.Refresh;
case TapiEvent of
TE_CALLNOTIFICATION :
begin
Memo1.Lines.Add('call notification');
end;
end;
end;
|
|
|
|
|
Hi,
Please advice me your FTKernelAPI BitTorrent Protocol Library & Demo Source is not working with downloading abc.torrnet having 1080p.
Please advise me or if possible could you provide me latest updated library for FTKernelAPI BitTorrent Protocol Library & Demo Source.
I am waiting for quick response.
Thanks
Vikas
|
|
|
|
|
I presume that you are referring to some article here on CodeProject. In which case you should post your question in the forum at the end of the article so the author sees it.
|
|
|
|
|
Message Closed
modified 25-Dec-19 17:48pm.
|
|
|
|
|
hi
i want create transparnt form in vcl .i am locking for source code transparent form in vcl.
i want to put image in form that transparent because form have n't backgrand
please help me
best regards
|
|
|
|
|
Looks like you've several posts on same question, correct?
|
|
|
|