Click here to Skip to main content
14,177,305 members
   

Delphi

 
QuestionBad XML document: An invalid character was found in text content. 'º' Pin
NJdotnetdev1-Jul-15 4:54
memberNJdotnetdev1-Jul-15 4:54 
SuggestionRe: Bad XML document: An invalid character was found in text content. 'º' Pin
Richard MacCutchan1-Jul-15 7:37
protectorRichard MacCutchan1-Jul-15 7:37 
GeneralRe: Bad XML document: An invalid character was found in text content. 'º' Pin
NJdotnetdev1-Jul-15 8:47
memberNJdotnetdev1-Jul-15 8:47 
GeneralRe: Bad XML document: An invalid character was found in text content. 'º' Pin
Richard MacCutchan1-Jul-15 21:07
protectorRichard MacCutchan1-Jul-15 21:07 
GeneralRe: Bad XML document: An invalid character was found in text content. 'º' Pin
NJdotnetdev6-Aug-15 5:14
memberNJdotnetdev6-Aug-15 5:14 
Questiondbx.sql in an unrecognized command type error Pin
Member 117531599-Jun-15 4:03
memberMember 117531599-Jun-15 4:03 
SuggestionRe: dbx.sql in an unrecognized command type error Pin
Richard MacCutchan9-Jun-15 4:09
protectorRichard MacCutchan9-Jun-15 4:09 
GeneralRe: dbx.sql in an unrecognized command type error Pin
Member 117531599-Jun-15 4:53
memberMember 117531599-Jun-15 4:53 
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.
GeneralRe: dbx.sql in an unrecognized command type error Pin
Richard MacCutchan9-Jun-15 5:06
protectorRichard MacCutchan9-Jun-15 5:06 
GeneralRe: dbx.sql in an unrecognized command type error Pin
Member 117531599-Jun-15 5:28
memberMember 117531599-Jun-15 5:28 
GeneralRe: dbx.sql in an unrecognized command type error Pin
Richard MacCutchan9-Jun-15 5:43
protectorRichard MacCutchan9-Jun-15 5:43 
QuestionWhat will be compressed when using Compress function in FastReport Pin
Thanhtrung.xl12-May-15 22:44
memberThanhtrung.xl12-May-15 22:44 
SuggestionRe: What will be compressed when using Compress function in FastReport Pin
smags1318-May-15 20:14
membersmags1318-May-15 20:14 
QuestionProblems with .QRP files Pin
Matheus Pombo10-Mar-15 5:30
memberMatheus Pombo10-Mar-15 5:30 
QuestionRe: Problems with .QRP files Pin
Richard MacCutchan10-Mar-15 6:00
protectorRichard MacCutchan10-Mar-15 6:00 
QuestionReceive Call TAPI3 with delphi Pin
delphix526-Nov-14 11:47
memberdelphix526-Nov-14 11:47 
QuestionFTKernelAPI BitTorrent Protocol Library & Demo Source not working for downloading1080pixel filel file Pin
Member 1101132619-Aug-14 5:04
memberMember 1101132619-Aug-14 5:04 
AnswerRe: FTKernelAPI BitTorrent Protocol Library & Demo Source not working for downloading1080pixel filel file Pin
Richard MacCutchan19-Aug-14 5:11
protectorRichard MacCutchan19-Aug-14 5:11 
Questioncreate transparent form in vcl Pin
fatemehsoleimani12-Feb-14 20:13
memberfatemehsoleimani12-Feb-14 20:13 
GeneralRe: create transparent form in vcl Pin
smags1316-Mar-14 17:29
membersmags1316-Mar-14 17:29 
AnswerRe: create transparent form in vcl Pin
future201512-Jun-14 2:35
memberfuture201512-Jun-14 2:35 
GeneralRe: create transparent form in vcl Pin
fatemehsoleimani6-Oct-14 3:38
memberfatemehsoleimani6-Oct-14 3:38 
Questionimage curve mode for background form Pin
fatemehsoleimani8-Feb-14 20:07
memberfatemehsoleimani8-Feb-14 20:07 
AnswerRe: image curve mode for background form Pin
raja1always10-Feb-14 19:42
memberraja1always10-Feb-14 19:42 
GeneralRe: image curve mode for background form Pin
fatemehsoleimani11-Feb-14 4:59
memberfatemehsoleimani11-Feb-14 4:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Cookies | Terms of Service
Web06 | 2.8.190526.1 | Last Updated 25 Apr 2019
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid