Delphi

59K

Solutions

17K

Contributors

Delphi is the most powerful Object Pascal IDE and component library for cross-platform Native App Development with flexible Cloud services and broad IoT connectivity. It provides powerful VCL controls for Windows 10 and enables FMX development for Windows, Mac and Mobile. Delphi is your choice for ultrafast Enterprise Strong Development™. Look for increased memory for large projects, extended multi-monitor support, improved Object Inspector and much more. Delphi is 5x faster for development and deployment across multiple desktop, mobile, cloud and database platforms including 32-bit and 64-bit Windows 10.

Share tech news, updates, or what's on your mind.

Sign up to Post

I have a working system that uses SQL Express as the database.
On 2 computers, window 8.1, everything is okay.
I have just installed another computer with Windows 10 and the program brings an error when assigning MyQuery.FieldByName('MyDateField').AsDateTime to a DateTime variable.
It only happens on this computer.

I have installed the program on my development computer that is also Windows 10 and using SQL Express and have no problems.

The ShortDateFormat is the same on all computers.

1. The command ShowMessage(ShortDateFormat) displays the same on all computers 'd/MM/yyyy'
2. FieldByName('MyDateField').AsString on the working computers displays the date in the ShortDateFormat, like '31/12/1999'
3. FieldByName('MyDateField').AsString on the new computer displays the date as '1999-12-31'
4. FloatToStr(FieldByName('MyDateField').AsDateTime) on the new computer raises error "'1999-12-31' is not a valie date time."

All the settings are the same

I have never seen anything like that and I need your help here.

Using Delphi 7 and SDAC
0
Keep up with what's happening at Experts Exchange!
LVL 12
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Hello,

I need to use a SOAP interface of the Dogana in Italy.
I develop some code in delphi (berlin) using SOAPHTTPClient, but i become always this error:

"Impossibile passare dalla codifica corrente a quella specificata.
Line: 1
<?xml version="1.0" encoding="utf-8"?><s."

I try
HTTPRIO.Converter.Options:=HTTPRIO.Converter.Options+[soUTF8InHeader];
HTTPRIO.Converter.Options:=HTTPRIO.Converter.Options+[soUTF8EncodeXML];
HTTPRIO.HTTPWebNode.UseUTF8InHeader:=true;
HTTPRIO.Converter.Encoding := 'UTF-8';

Thank you for the help.

Andreas
0
I got a signed executable, when running on my local machine everything works fine but with one of our clients there is an issue when they try to run it from a network drive.
They get a "Open File - Security Warning" (see the image). When they run it from a local disk, there are no issues as well
network-drive-error.PNG
0
please help me to translate this memory loader to delphi

#include "stdafx.h"
#include <Windows.h>

DWORD GetSectionProtection(DWORD sc)
{
    DWORD dwResult=0;
    if (sc & IMAGE_SCN_MEM_NOT_CACHED)
        dwResult |= PAGE_NOCACHE;

    if (sc & IMAGE_SCN_MEM_EXECUTE)
    {
        if (sc & IMAGE_SCN_MEM_READ)
        {
            if (sc & IMAGE_SCN_MEM_WRITE)
                dwResult |= PAGE_EXECUTE_READWRITE;
            else
                dwResult |= PAGE_EXECUTE_READ;
        }
        else 
        {
            if (sc & IMAGE_SCN_MEM_WRITE)
                dwResult |= PAGE_EXECUTE_WRITECOPY;
            else
                dwResult |= PAGE_EXECUTE;
        }
    }
    else
    {
        if (sc & IMAGE_SCN_MEM_READ)
        {
            if (sc & IMAGE_SCN_MEM_WRITE)
                dwResult|=PAGE_READWRITE;
            else
                dwResult|=PAGE_READONLY;
        }
        else 
        {
            if (sc & IMAGE_SCN_MEM_WRITE)
                dwResult|=PAGE_WRITECOPY;
            else
                dwResult|=PAGE_NOACCESS;
        }
    }

    return dwResult;
}


inline BOOL IsImportByOrdinal(DWORD ImportDescriptor)
{
    return (ImportDescriptor & IMAGE_ORDINAL_FLAG32)!=0;
}

#ifndef MIN
#define MIN(a,b) ((a)<(b)?(a):(b))
#endif

//typedef BOOL (WINAPI *pointMAIN)(int , char*);

typedef BOOL (WINAPI *pointWINMAIN)(HINSTANCE, HINSTANCE, LPSTR, int);


HMODULE MemLoadExe(PBYTE data)
{
    IMAGE_FILE_HEADER        *pFileHeader        = NULL;
 

Open in new window

0
I have a horrible problem with Delphi XE7.
The Hard Disk on my Desktop PC crashed and I had to reinstall Delphi XE7.
Although my Laptop and Desktop have identical structures for all the components and .pas files, I can't compile my Apps on the Desktop in the IDE.
The Laptop compiles like clockwork, but on my Desktop I get continuous "Out of Memory" exceptions, and then the IDE aborts.
I have tried to use IdeFixpack, and that made it even worse. I also tried Madshi's MadCollection with the same result.
I have spent 3 Days on this, without success. Has anybody an idea, what the problem could be?
0
This happens when a particular table is opening upon initialization.

Got this message using EurekaLog:

Exception:
--------------------------------
  2.2 Address: 008C4A85
  2.5 Type   : EApolloError
  2.6 Message: Scope Set failed.
  2.7 ID     : 4A5B93DE
  2.11 Sent  : 0

I'm aware this question is vague but I'm hoping someone on here has encountered a similar issue. Thanks.
0
I wanna make the mobile game called '2248' on PC and I'm almost done, im just having a problem with the Accept parameter of the Dragover event. The problem is that I want the program to allow the dragging only the panel which's caption is identical, or if I have already dragged a few panels before then also allow the drag if  the sum of the panels caption dragged before equals to the one im trying to drag to. And also, I dont want the panels to be able to dragged into panels that are not their 'close-neighbours', so only allowing to drag to the panels next to it.
Here is a picture of how It actually looks like, if u dont know the game:https://m.crazygames.com/game/2248
procedure TForm1.balklikk(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if Button=MBleft then begin
TPanel(sender).BeginDrag(True);
kiindulo:=strtoint(TPanel(sender).caption);
oszeg:=strtoint(TPanel(sender).caption);
end;
end;

procedure TForm1.over(Sender, Source: TObject; X, Y: Integer;
State: TDragState; var Accept: Boolean);
begin
Accept :=(Source is Tpanel) and ((Tpanel(sender).caption=Tpanel(source).caption) or (oszeg=strtoint(Tpanel(Sender).caption)));
Tpanel(source).Tag:=1;
if (Source is Tpanel)
  and (Sender is Tpanel)
    and (Source <> Sender)
      and (Tpanel(Sender).Tag=0)
        and(Accept=true)
          and (State = dsDragEnter) then begin
z:=z+1; T2[z]:=Tpanel(Sender); Tpanel(Sender).Tag:=1; oszeg:=oszeg+strtoint(Tpanel(Sender).caption);
end;
end;

Open in new window

on the 'balklikk' event of the panel it just checks if it was a left click, if yes then the dragging begins. Also i have declared here a variable that later on in the over event counts the sum of the previously dragged panels captions. If the initial caption is= with the one we dragged to(source.caption=sender.caption) then it will go to a for cicle in which i store the dragged panels and also i increase the sum(oszeg) with the (sender), so next time something gets dragged, it also gets analyized whether the sum is = or not.
0
Hi. I'm working in Delphi xE7.  I recently changed computers.  I installed the same delphi on the new pc and when I tried to run a certain part of my project where I use a Timage on a form I got an exception EInvalidGraphic with message "Unknown picture file extension (.png)."  Mind you this program was working on the previous pc.  Is there something that I'm missing perhaps when I installed on the new pc?  Any ideas or suggestions of what I could look for would be greatly appreciated.  Thanks in advance.
0
Hi !
Are it possible to rotate a video using Dspack ?
Have downloded JongovEdgeDetectFilter but I can´t get it to work !
Ilkka
0
Hello,i wish that you are fine
My problem is that i want to send a text file from my computer to another one using Delphi 7 how can i do this please
thanks.
0
Cloud Class® Course: Amazon Web Services - Basic
LVL 12
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

I am using Delphi con connect to mysql, using myDac componentes (paid version).

I have a table called items(upc,description,retail,picture).
picture is a Blob Field storing .bmp or .jpg images.

How can I show a .jpg image from a BLOB field using the DBCtrlGrid and DBImage component on Delphi XE7.

There is no way for me to have .jpg in the Blob and be able to show it on the DBImage over the DBCtrlGrid, as if .bmp is the only image supported, only .bmp works ok.

I used the DBCTRLGRID to arrange the way visual components should display information, but it seems only to support display for .gmp images, I already put in use the .jpeg library but no luck.
DBCtrol_grid_noJPG_SUPPORT.png
0
Fast MM4 for Delphi, cant get fulldebugmode to work. When i link the fulldebugmode.dll to the tools/optoins/library/library path or /browsing  path or ion the same folder as my exe the program just wont rund after i build and hit F9/Run. It returns to the same state as after a run. I am missing something but what?
Flsdihf
0
I want to programmatically have a form made visible in its normal size on the screen, when currently it is minimized (so just appears as an icon in the windows bar
0
The last versions of RAD Studio allow you to create appx packages for Microsoft Store. This is what I'm trying to do now with my Delphi project for Windows. There are some additional files which should be included in the package; during the installation, I want them to go to the default data folder like <user>\AppData\Roaming\MyApp, so that the users can easily access them.

In RAD Studio, additional files are specified in Deployment Manager. There's a parameter called Remote Path which determines the folder where the file will be put. The default is '.\' which is the installation folder. I don't want all my files to go there. But I couldn't find how you can specify the default data folder.
0
Hi
Can you some one help me for following
i am using Quick Report 6  and Delphi Berlin 10.1

What i need
 generate report and send via e mail  

option  to be saved or send mail
0
When I try to Deploy/Run F9 my FireMonkey mobile app from a Win10.1x32 machine to an Ipad 4 mini, I get the following error:

paclient exited with code 1

When I change the build target to Android, everything works fine. I used Delphi Berlin and XCode 9.2 and it's my first iOS app.

Can anybody give me an advise?
0
I have a text file available and I want to place its entire content (including carriage-return/line feed) in the ClipBoard ...
0
Hi,

This question is related, to :
OS: Win 10
Prog Lang : Delphi 10.2
Type: OAuth 1 Request
Api: Flickr API
Method: flickr.photos.comments.addComment
Description: Add comment to a photo as the currently authenticated user.
Required Params (3):
  1. api_key (Mandatory): API application key.
  2. photo_id (Mandatory): The id of the photo to add a comment to.
  3. comment_text (Mandatory): Text of the comment
Help: https://www.flickr.com/services/api/


Infos
My application IS
  1. - fully functional,
  2. - authenticated,
  3. - authorized
  4. - and already uses similar functions requiring authentication.
May Application HAS
- Read and Write perms
Photo ID IS VALID
- 37003221603
   
Question:
How to add a COMMENT on a photo knowing its ID using the method "flickr.photos.comments.addComment" provided by the Flickr's Api ?
I've written the following function returning the request to send to Flickr in a similar way done for all functions that are working without problem.
But this one gives me an invalid result:

"oauth_problem=signature_invalid&debug_sbs=GET&https%3A%2F%2Fapi.flickr.com%2Fservices%2Frest&comment_text%3DWord%26format%3Drest%26method%3Dflickr.photos.comments.addComment%26oauth_consumer_key%3De18bf8e598480c5e03091a6a1c0b76c3%26oauth_nonce%3D3FD8DA177DB415864FF5B52B9982B120%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1521484643%26oauth_token%3D72157663363639987-7eb5726589a2beb0%26oauth_version%3D1.0%26photo_id%3D37003221603"
0
Hi can you help to write correct Query for Filter 3 Data fields

for Example
Data1 , Data2 , Data2

txt1 = Data1
txt2= data2
txt3 = data3

ex1: Data1  and Data 3
ex2: Data 3 and Data2
ex3: Data 1, Data 2 Data 3

Qury.Close;
Query.Sql.Clear;
Qury.Sql.Add (Select * From Table1);
If Not (txt1.text = ' ')then
   Begin
   Qury.Sql.Add(Format ('Where Data1= ' '%s' ' ',[txt1] ));
  end;
If not (txt3.text = ' ') then
   Begin
   Qury.Sql.Add(Format ('and Data3= ' '%s' ' ',[txt1] ));
  end;

lets say txt1 one is blank then how to write correct code ?
0
Free Tool: Path Explorer
LVL 12
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Hello,

I’m looking for a solution that allows me to convert *.doc or *.docx to *.pdf within Delphi DX10 Berlin / Tokyo Enterprise.
The solution should work even if MS Word isn’t installed on the users system.

Basically sending the Word-document to printer "Microsoft print to PDF" would do the trick for me. But all without any user interaction.


Thanks!
0
hi i have done following code to get data from table to String grid combo box and pass it to colums, but once i select data in first row its ok if i go to second row and select the items from combobox it does not show only shows first item which i select only, please check the attach images and code what i did please

procedure TfQuotation.StringGrid1GetEditorProp(Sender: TObject; ACol,
  ARow: Integer; AEditLink: TEditLink);
begin
with stringgrid1 do
    case acol of 0:
    begin
    ClearComboString;
    Combobox.Items.Add('HARDWARE');
    Combobox.Items.Add('SERVICE');
    end;
end;

end;
//================================================================
procedure TfQuotation.StringGrid1ComboDropDown(Sender: TObject; ARow,
  ACol: Integer);
begin
  with stringgrid1 do
      case acol of 2:
        begin
        ClearComboString;

        if (cells[0, arow] = 'HARDWARE') then
          begin
          QItem.Close;
          QItem.Open;
          QItem.First;
            repeat
            Combobox.Items.Add(QItem.FieldByName('Description').AsString);
            QItem.Next;
            until QItem.Eof;

          end;
        //======================================================================

        if (cells[0, arow] = 'SERVICE') then
          begin
          QService.Close;
          QService.Open;
          QService.First;
            repeat
            Combobox.Items.Add(QService.FieldByName('ServiceName').AsString);
0
I need to get a Token from a WebSite.
I have attached a C# program, which I need to translate to Delphi.
OAuthFromWindowsApp.zip which you can download from here: ftp://compmark.biz/Authorization/OAuthFromWindowsApp.zip
I am playing around with it, but am not getting anywhere.

I haven't used Experts Exchange for a long time and I can't see, how to give points anymore.

I would like to allocate 1000 points for a solution if this is still valid. Or let me know if you want more.
I am very negotiable on this.
0
Hello,
I import data from table paradox to text file in timer wish the interval=one hour i want that my application run without form i put this instruction before Application.Run (Application.ShowMainForm := False) but i can't close the execution because i have not a form any solution please ,I m using Delphi 7(sorry for my bad english)
0
Hello,
I import data from table paradox to text file in timer wish the interval=one hour i want that my application run without form i put this instruction before Application.Run (Application.ShowMainForm := False) but i can't close the execution because i have not a form any solution please ,I m using Delphi 7(sorry for my bad english)
0
I want to have the background color of a particular TStringGrid cell to be for example Red when I write a string in that cell.
What is the instruction I have to place in the TStringGrid OnDrawCell event ?
0

Delphi

59K

Solutions

17K

Contributors

Delphi is the most powerful Object Pascal IDE and component library for cross-platform Native App Development with flexible Cloud services and broad IoT connectivity. It provides powerful VCL controls for Windows 10 and enables FMX development for Windows, Mac and Mobile. Delphi is your choice for ultrafast Enterprise Strong Development™. Look for increased memory for large projects, extended multi-monitor support, improved Object Inspector and much more. Delphi is 5x faster for development and deployment across multiple desktop, mobile, cloud and database platforms including 32-bit and 64-bit Windows 10.