Quantcast
Channel: Recent Topics - Forum - Embarcadero Community - Embarcadero Community
Viewing all 3677 articles
Browse latest View live

TPropertyEditor - propsys.h - 'IPropertyDescription' conflicts - by: Ted

$
0
0
Hi!

I've written a few components before but have never tried creating a custom property editor so I thought I would give it a try. I tried to follow the tips on the Design Editors page.
* Added $(BDSINCLUDE)\windows\vcl\design to the System Include Path
* Added designide.bpi to the Requires of my package.

I then added a Design-Time Package to contain the editor only.


When trying to compile, I get this:


The code in conflict looks like this:



I'm guessing I need to include something that forward defines IPropertyDescription before I include DesignEditors.hpp, but I can't find out what.

C++ Builder 10.2.1

Br,
Ted

Starting service says cannot find the file specified - by: Frank

$
0
0
What file name is it looking for? Is there any way to tell? The file name I see in the properties on the Services page does exist but that must not be the file it is really looking for.

passing struct as paremeter - by: Gary

$
0
0
I want to know how to set up a function to accept a struct as a parameter such as

struct my_s
{
int a;
int b;
ansistring t;
}
/// in other part of program

my_s sample
foo(sample)

void foo(struct this)
{
this.a = 1;
this.b = 2;
this.t = " Whoo, that was tough";
return this;
}

Understand!

Andriod Test App read time out when transferring a file to web server - by: Peet

$
0
0
I am using Delphi 10.2.3 Enterprise and write a small test Andriod app to transfer a binary file from the cellphone to my website using the Indy Client IdFTP. It does transfer the file, but the app gets a Read Timed Out message after a while. Another strange thing is that the date of the filed transferred shown the year 2014?
one problem can be that I do not understand the last parameter of the put statement, namely the Int64?
my line is : idftp1.put(fname,'Testdb.dat',false,0); Much appreciated if somebody can help me. Thank you.

C++Builder debug: Process is not accesible - by: Emanuele

$
0
0
My problem appears sometimes when debug my application.
I stop application with a breakpoint. If I perform "Step over" I've no problem: I can see variables in the watch, inspect, etc... But, if I perform a "Trace into", my process freezes and and I've this message "Process is not accesible" in call stack window.
I'm in debug, all debug is on.

Regards

ListView - how to get item text - by: Ľubomír

$
0
0
Hi, I have ListView and in Object inspector I have structure - ListView1->ItemAppearance->Item->Text3. Text3 was created on design mode of ListView. ListViev is sucessfuly merged with database. All is good, but I do not know how to read text of Text3. Something like:
ListView1->Items->operator [](ItemIndex)->Text3
Can someone help me?
Thanx.

Error Sorting Database - by: Earl

$
0
0
I have tried to post this question several times but the I kept getting a 'Blocked' message. I have added the underscore character '_' at several obvious points in the message to try and avoid the 'Blocked' message. There is nothing in the post that appears malicious to me. If anyone sees anything in the post that is malicious, please let me know and I will delete the post. Anyway here is the original post with the obvious underscore characters added:

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

I am writing a program that examines generic SQLite databases. I have an OnTitleClick event that toggles between sorting the field ascending or descending. My problem is that when I click on the 'MemberInfoID' column title, the address of the column changes, which leads to errors in the program. Clicking on any other column works as expected. I looked at the data in the 'MemberInfoID' field with sqlite3.exe and it all looks OK.

To aid in troubleshooting, I added the Edit1 TEdit control to watch the changes in the 'Column' address.

I wrote another small test program to troubleshoot the problem and the problem still occurs.

Note: the problem also occurs in other SQLite tables in the database. Fields that exhibit the problem, always exhibit the problem. Fields that do not exhibit the problem never exhibit the problem, so it is not random. The problem also seems to be independant of data type. Some fields with integer types and some fields with varchar types exhibit the problem, but not all fields with those fields exhibit the problem.

The following controls are in the main form:
DBGrid
TEdit

The following controls are in the DataSource file:
FDPhysSQLiteDriverLink1
FDConnection
FDQuery
DataSource

Other than setting the FDConnection driver and database, adding an SQL to the FDQuery, and linking the DBGrid, DataSource, and DataSet, all other properties are the default values.

This code below is all of the code that I have written. The rest is generated by C++ Berlin 10.2.

void __fastcall TForm2::DBGridDataTitleClick(TColumn *Column) {
Edit1->Text = int(Column);
AnsiString ColumnFieldName = Column->FieldName;
if ((ColumnToSort != NULL) && (ColumnToSort == Column))
SortAsc = !SortAsc;
else
SortAsc = true;

UnicodeString SQLString = "SELECT * From SSAttendance";
SQLString += " ORDER BY ";
SQLString += ColumnFieldName;
if (!SortAsc)
SQLString += " DESC";
/*
if I return here, the column address does not get overwritten. If I comment this line out, the 'MemberInfoID'column is overwritten in the following code:
*/
return;
DataModule3->FDQueryData->Close();
DataModule3->FDQueryData->SQL->Text = SQLString;
DataModule3->FDQueryData->Open();

ColumnToSort = Column;
}


Why does the code to sort the database overwrite the 'Column' address when the 'MemberInfoID' column title is clicked in this table?

I know the column address should change the first time the column title is clicked, but not on subsequent clicks.

Regards...
Earl Staley

Sharing data between two Delphi Apps - by: Ian

$
0
0
What would be the best method of sharing data between two Delphi Apps? One app is VCL, the other is FMX, both on a Windows 10 platform.

I need to send a stream of data that is being read via USB from the VCL app over to the FMX App.

I was thinking of using two system environment variables, and writing to the variables from one app and reading from the other.

The data rate is upwards of 140 packets (45 characters) per second.

Does anyone have any suggestions or sample code?

TStringgrid ondoubleclick event not firing? - by: Chris

$
0
0
I've got a form with a tstringgrid component and I want to perform an action on a cell when the cell is double clicked. I added an OnDblClick event and added some code but I set a breakpoint on the first line of code in the event and when I'm running it in the IDE and double click on a cell the event appears to never fire. Anyone have an idea why this is happening and how to fix it?

FireDAC data type conversion broken in Rad Studio 10.2 - by: Mike

$
0
0
I’ve recently upgraded from Rad Studio 10.1 Berlin to 10.2 Tokyo and ran into a data type problem with my FireDAC queries. The following query illustrates the issue. This is being run against an Oracle database using a TFDPhysOracleDriverLink with the CharacterSet := csUTF8;

query := TFDQuery.Create(self);
try
query.Connection := FDConnection1;

query.SQL.Add('select ''X'' as test1');
query.SQL.Add('from dual');
query.SQL.Add('union');
query.SQL.Add('select :param1');
query.SQL.Add('from dual');

with query.ParamByName('param1') do
begin
DataType := ftWideString;
Value := 'Y';
end;
query.Open();

Rad Studio 10.2 throws the following when the above query is executed:
Exception - Project FireDACTest.exe raised exception class EOCINativeException with message '[FireDAC][Phys][Ora] ORA-12704: character set mismatch'

From my testing it appears there was a change to how the static strings are cast. I can explicitly cast the text in the query using TO_NCHAR(‘’X’’) so it matches the ftWideString of my param. Alternatively, I can change my param to ftString to match the ‘’X’’. Neither option is a feasible.

This behavior is new to Rad Studio 10.2 as the same code executes fine in 10.1. Does anyone have input on how to move forward so the above query executes without error? Possibly a new setting in FireDAC or something on the database side?

Error Sorting Database - by: Earl

$
0
0
I have tried to post this question several times but the I kept getting a 'Blocked' message. I have added the underscore character '_' at several obvious points in the message to try and avoid the 'Blocked' message. There is nothing in the post that appears malicious to me. If anyone sees anything in the post that is malicious, please let me know and I will delete the post. Anyway here is the original post with the obvious underscore characters added:

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

I am writing a program that examines generic SQLite databases. I have an OnTitleClick event that toggles between sorting the field ascending or descending. My problem is that when I click on the 'MemberInfoID' column title, the address of the column changes, which leads to errors in the program. Clicking on any other column works as expected. I looked at the data in the 'MemberInfoID' field with sqlite3.exe and it all looks OK.

To aid in troubleshooting, I added the Edit1 TEdit control to watch the changes in the 'Column' address.

I wrote another small test program to troubleshoot the problem and the problem still occurs.

Note: the problem also occurs in other SQLite tables in the database. Fields that exhibit the problem, always exhibit the problem. Fields that do not exhibit the problem never exhibit the problem, so it is not random. The problem also seems to be independant of data type. Some fields with integer types and some fields with varchar types exhibit the problem, but not all fields with those fields exhibit the problem.

The following controls are in the main form:
DBGrid
TEdit

The following controls are in the DataSource file:
FDPhysSQLiteDriverLink1
FDConnection
FDQuery
DataSource

Other than setting the FDConnection driver and database, adding an SQL to the FDQuery, and linking the DBGrid, DataSource, and DataSet, all other properties are the default values.

This code below is all of the code that I have written. The rest is generated by C++ Berlin 10.2.

void __fastcall TForm2::DBGridDataTitleClick(TColumn *Column) {
Edit1->Text = int(Column);
AnsiString ColumnFieldName = Column->FieldName;
if ((ColumnToSort != NULL) && (ColumnToSort == Column))
SortAsc = !SortAsc;
else
SortAsc = true;

UnicodeString SQLString = "SELECT * From SSAttendance";
SQLString += " ORDER BY ";
SQLString += ColumnFieldName;
if (!SortAsc)
SQLString += " DESC";
/*
if I return here, the column address does not get overwritten. If I comment this line out, the 'MemberInfoID'column is overwritten in the following code:
*/
return;
DataModule3->FDQueryData->Close();
DataModule3->FDQueryData->SQL->Text = SQLString;
DataModule3->FDQueryData->Open();

ColumnToSort = Column;
}


Why does the code to sort the database overwrite the 'Column' address when the 'MemberInfoID' column title is clicked in this table?

I know the column address should change the first time the column title is clicked, but not on subsequent clicks.

Regards...
Earl Staley

Stored procedure for dropping multiple tables - by: Robert

$
0
0
While exploring DB I realized I had been saving mailing lists for years. They are all names NLxxxxxxxx.
I have dropped many one by one but many, many more to go. I have the code working to get the list of all tables
in a string list. I supposes I can clear out the ones that don't meet the NLxxxxxxxx pattern then use that to iterate through dropping the table.
If anyone has an example of such a stored procedure I would appreciate a look see before spending time reinventing the wheel,

Best regards

FireDAC data type conversion broken in Rad Studio 10.2 - by: Mike

$
0
0
I’ve recently upgraded from Rad Studio 10.1 Berlin to 10.2 Tokyo and ran into a data type problem with my FireDAC queries. The following query illustrates the issue. This is being run against an Oracle database using a TFDPhysOracleDriverLink with the CharacterSet := csUTF8;

query := TFDQuery.Create(self);
try
query.Connection := FDConnection1;

query.SQL.Add('select ''X'' as test1');
query.SQL.Add('from dual');
query.SQL.Add('union');
query.SQL.Add('select :param1');
query.SQL.Add('from dual');

with query.ParamByName('param1') do
begin
DataType := ftWideString;
Value := 'Y';
end;
query.Open();

Rad Studio 10.2 throws the following when the above query is executed:
Exception - Project FireDACTest.exe raised exception class EOCINativeException with message '[FireDAC][Phys][Ora] ORA-12704: character set mismatch'

From my testing it appears there was a change to how the static strings are cast. I can explicitly cast the text in the query using TO_NCHAR(‘’X’’) so it matches the ftWideString of my param. Alternatively, I can change my param to ftString to match the ‘’X’’. Neither option is a feasible.

This behavior is new to Rad Studio 10.2 as the same code executes fine in 10.1. Does anyone have input on how to move forward so the above query executes without error? Possibly a new setting in FireDAC or something on the database side?

InterBase error message: Unknown SQL Data type (0) - by: Patricio

$
0
0
Hi,

I'm trying to connect to a Server InterBase XE3 from a new instance of my application on a customer network where there are already two instances on two different PC's that have been working well for a long time, one of them as a server and the other as a client, but the new instance is failing and showing the error message from the subject at the first table that it tries to open.

I checked some posts on the Internet that make references to the parameters of the query, but in this case the query is very simple and does not have any parameters.

The instance that is failing is on my develop machine that I'm connecting to the server from inside of the LAN network. I'm already checked the connectivity to the customer PC server with Ping and with IBConsole that could access the database and the tables without problem. This instance have some optimizations vs the customer version whose could affect, but then I installed these optimized version on the customer PC server and also on the PC client and on both of them works well.

This is the line of code where the error is being triggered:


Looking inside, I found that the error is generated at the IBX.IB module, here:


Could someone help me with this problematic error message?

Best regards,
Patricio Cerda

Delphi 10.2 error on startup "The notification platform is unavailable." - by: Paul

$
0
0
Hi all,
I had been using Delphi 10.2 Community edition quite happily up until today when I decided I didn't want the form designer embedded anymore. I went and unchecked the embedded option and restarted the IDE. Every time I run it since then I get the error "The notification platform is unavailable.". I have uninstalled it and reinstalled it, but to no avail. I have linked in a screenshot of the error dialog box.



If I hit ok, the IDE loads up partially with the same error:


After hitting ok again, it closes down and I then have to use the task manager to kill a process in memory.

Any ideas? This is driving me nuts :(
cheers,
Paul

why a xe10 android project splash image always using 470x320 - by: Monday

$
0
0
i make 4 9-patch png image contains 1-4 digit correspond as 426*320 470*320 640*480 960*720, and set splash image and run on nexus4, the splash image show "2", it use 470x320 splash image, but nexus4's screen is 720*1080, does i doing something wrong?

sorry about my bad english. thx.

TabbedMap sample crashes on android device - by: Pet

$
0
0
I'm trying to run two sample programs available in the installation of the Delphi 10.2 Community Edition , TabbedMapProject and Map_ObjectPascal into android devices. Both of them , after the successfully installation into target device , are crashed immediately after loading.
I did perform all the steps provided by Embarcadero in the documentation of these samples (providing my Google Api Key etc).
The android devices are a Huawei phone with android 8 and a Sumsung tablet with Android 4.x vers. In the same devices I did installed and execute successfully other android applications written in the same version of Delphi. Any idea to solve this problem?

problem opening mime types with more than one dot in the name. - by: cue

$
0
0
If i want to open a link or file with more than on dot in its name the default app is not my program.

Thats my xml file config for the extension m3u:

<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="file" android:host="*" android:pathPattern=".*\\.m3u" android:mimeType="*/*" />
<data android:scheme="ftp" />
<data android:scheme="content" />
<data android:scheme="http" />
<data android:scheme="https" />
</intent-filter>

What i am doing wrong?

Datasnap - by: Tony

$
0
0
I am totally new to this new Embarcadero Web site, so my first comment is how do I get access to specific forums. Right now I want to get into the Datasnap Forum. How do I do that ? Id really appreciate some helpe as I was expecting to find a list of forums that I could find the correct one to post questions on.

Datasnap client server - by: Tony

$
0
0
HI all. I am attempting to master a simple data snap client and server. For starters I just use TSQLCOnnection and TDSProvider connector. . No issues. I can use TClient dataset on client side and TADOQuery on server side. This is what I am used to from many years of using the old Midas Com technique.

Now next step is I want to make some functions in the server. I watched a video by Pavel and was able to make simple function calls.

Now I want to use In, Out, and Var parameters. I want to use Variants as parameters. I want to pass data sets. So far I cannot make any of this work. Can anyone assist me with this learning curve please.

Thanks a lot,

Tony
Viewing all 3677 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>