delphi-xe

How can I attach the Delphi debugger to 64-bit IIS 7.5?

本小妞迷上赌 提交于 2021-02-18 22:20:46
问题 I'm running Delphi XE on Windows 7 Pro 64 and IIS 7.5, developing an ISAPI application. IIS is configured correctly (including allowing 32-bit code to run in an ISAPI process). The ISAPI process runs properly. In Delphi I'm trying to attach to the ISAPI process running on localHost to step through my ISAPI.dll code: Run->Attach to Process->InetInfo.exe. I've done this a thousand times with Windows XP and IIS 5, but in this new environment I cannot attach to the ISAPI process. I get an error

conversion of a string from some codepage to Unicode

二次信任 提交于 2021-02-08 07:53:52
问题 I would like to convert a CP-1253 string to Unicode and also perform the opposite conversion as well. Suppose I have two variables holding the strings, a MySource1253 and a MyUnicodeTarget . I presume AnsiString to be the appropriate type for MySource1253 , while String should be suitable for MyUnicodeTarget , please correct me if I am wrong. Is there some function in Delphi XE to make these conversions from one to the other and vice versa? 回答1: Declare: type GreekString = type Ansistring

Incrementing Delphi XE project version number from command line

回眸只為那壹抹淺笑 提交于 2021-02-07 13:47:57
问题 I have a Delphi XE project and I'm trying to change the version number of the program before building it with MSBuild. Version number information is located in the DPROJ file but if I change these values the version number does not change. I think the reason for this is that when you change version number in the IDE, Delphi saves the changes to both DPROJ and RES files. Is there a way to compile the RES file from the command line with the changes in DPROJ file? I found this question which

How to parse a json string response using Delphi

青春壹個敷衍的年華 提交于 2021-02-07 12:32:29
问题 I have a rest server returning the next json string: response:='{"result":["[{\"email\":\"XXX@gmail.com\",\"regid\":\"12312312312312312313213w\"},{\"email\":\"YYYY@gmail.com\",\"regid\":\"AAAAAAA\"}]"]}'; I´d like to parse the response to get a list of all email and regid items. I have tried the next code but I am getting an AV at (TJSONPair(LItem).JsonString.Value='email') Any help will be appreciated. Thanks in advance, Luiz var LResult:TJSONArray; LJsonresponse:TJSONObject; i:integer;

Build event macros in Delphi XE

依然范特西╮ 提交于 2021-02-04 10:54:07
问题 According to Delphi's help file, when I open the dialog box to add build events to my project's options, the dialog box should show a list of macros (placeholders) that I can use on the command line for the build event. When I try this in Delphi XE, the list of macros is empty. The help file doesn't say which macros are available either (that I could find). So, which macros are available? Right now I need a macro for the full path to the compiled .exe file (post-build), and the full path to

Using sql-server datetime2 with TADOQuery.open

天涯浪子 提交于 2021-01-27 11:47:29
问题 I want to start using datetime2 fields in SQL Server and I need to insert into the tables via ADO from Delphi XE5. I am using TADOQuery.ExecSQL to insert and everything works fine. However most of my tables have identity columns, e.g. id integer identity(1,1) not null To save round-trips to the server, I usually use Open with two commands in the query text. The first command is the insert the second command is "select scope_identity() as scope_id" so I can retrieve the newly inserted id in

Using sql-server datetime2 with TADOQuery.open

六眼飞鱼酱① 提交于 2021-01-27 11:44:42
问题 I want to start using datetime2 fields in SQL Server and I need to insert into the tables via ADO from Delphi XE5. I am using TADOQuery.ExecSQL to insert and everything works fine. However most of my tables have identity columns, e.g. id integer identity(1,1) not null To save round-trips to the server, I usually use Open with two commands in the query text. The first command is the insert the second command is "select scope_identity() as scope_id" so I can retrieve the newly inserted id in

IdHttp : how to deal with json request and response

放肆的年华 提交于 2020-12-15 06:57:17
问题 I have encountered a few sites that uses JSON for request and response I come across two types : 1- application/x-www-form-urlencoded as request and return a response application/json content type 2- application/json content type for both request and response in type 1 i tried changing the the response content type using mIdHttp.Response.ContentType := 'application/json'; but using http analyzer i can see that it doesn't change and its still text/html now i do not know if the problem is with

Hotel prices spanning multiple dates issue

霸气de小男生 提交于 2020-02-08 06:53:43
问题 Question is somehow related to this one, with the exception that I use parameters. I have this on my button click : procedure TForm1.Button1Click(Sender: TObject); begin with ABSQuery1 do begin ABSQuery1.Close; ABSQuery1.SQL.Clear; ABSQuery1.SQL.Add('select * from ROOM_RATES where CENIK_ID = :a4 and ROOM_TYPE = :A1'); ABSQuery1.SQL.Add('and rate_Start_DATE < :a3 AND rate_End_DATE > :a2 ORDER BY rate_Start_DATE ASC '); ABSQuery1.Params.ParamByName('a1').Value:= cxLookupComboBox2.Text;

How can I display a form for set configuration before the main form?

大兔子大兔子 提交于 2020-02-02 11:57:31
问题 in my project i have two form's(form1,form2), form1 is configuration form. i want to show Form1 and when we click Button1 then show Form2 and free(Release) Form1. how can to i do this? i use this code. but this project start and then exit automatically.A Friend said because the application message loop never start, and application terminates because main form does not exist. how i can to solve this problem? uses Unit2; {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); begin