delphi-2005

ADODB component causes access violation on Win7/Server 2008

笑着哭i 提交于 2019-12-07 18:09:24
问题 I have a piece of code written in Delphi 2005 that searches for a particular attribute on a user in LDAP. I get an access violation when this is run on either Windows 7 or Server 2008, but not on XP or 2003. Function IsSSOUser(UserId: String): Boolean; var S : string; ADOQuery : TADOQuery; ADOConnectionSSO: TADOConnection; begin result := false; Setdomainname; ADOQuery := TADOQuery.Create(nil); ADOConnectionSSO := TADOConnection.Create(nil); try ADOConnectionSSO.LoginPrompt := false;

Incompatibilities between Indy 9 and Windows Server 2003?

好久不见. 提交于 2019-12-07 13:49:31
问题 I'm having a problem with a Delphi application on some Windows 2003 servers. It uses a webservice call to connect with another server and transmit data back and forth. As soon as the app gets to the Authenticate method, the app dies. The app has worked for years on previous boxes with Win Server 2003, but it doesn't on freshly built machines. The machines are set up the same way for the most part, but there is clearly some config setting that differs that I'm not able to track down. Also,

How to debug Delphi IDE?

北战南征 提交于 2019-12-06 20:21:01
问题 What are the detailed steps on how to debug the Delphi IDE? I understand, from other posts, that one needs to create a project and, in the project's debugger settings, set the project's "host application" to Delphi ( C:\Program Files\Borland\BDS\3.0\Bin\bds.exe ). Then, when the project is run in the debugger (by pressing the F9 key), a second instance of the Delphi IDE should appear. I have managed to do the above step. However, when I run the project in debugger mode, I don't see any second

ADODB component causes access violation on Win7/Server 2008

﹥>﹥吖頭↗ 提交于 2019-12-06 02:30:07
I have a piece of code written in Delphi 2005 that searches for a particular attribute on a user in LDAP. I get an access violation when this is run on either Windows 7 or Server 2008, but not on XP or 2003. Function IsSSOUser(UserId: String): Boolean; var S : string; ADOQuery : TADOQuery; ADOConnectionSSO: TADOConnection; begin result := false; Setdomainname; ADOQuery := TADOQuery.Create(nil); ADOConnectionSSO := TADOConnection.Create(nil); try ADOConnectionSSO.LoginPrompt := false; ADOConnectionSSO.Mode := cmRead; ADOConnectionSSO.Provider := 'ADsDSOObject'; ADOQuery.Connection :=

Incompatibilities between Indy 9 and Windows Server 2003?

拜拜、爱过 提交于 2019-12-06 02:17:33
I'm having a problem with a Delphi application on some Windows 2003 servers. It uses a webservice call to connect with another server and transmit data back and forth. As soon as the app gets to the Authenticate method, the app dies. The app has worked for years on previous boxes with Win Server 2003, but it doesn't on freshly built machines. The machines are set up the same way for the most part, but there is clearly some config setting that differs that I'm not able to track down. Also, while the error becomes apparent in the call to Authenticate, packet sniffing proves that nothing ever

How to debug Delphi IDE?

别等时光非礼了梦想. 提交于 2019-12-05 01:46:09
What are the detailed steps on how to debug the Delphi IDE? I understand, from other posts, that one needs to create a project and, in the project's debugger settings, set the project's "host application" to Delphi ( C:\Program Files\Borland\BDS\3.0\Bin\bds.exe ). Then, when the project is run in the debugger (by pressing the F9 key), a second instance of the Delphi IDE should appear. I have managed to do the above step. However, when I run the project in debugger mode, I don't see any second instance of the Delphi IDE opening. Motivation There is a VCL component, for which I do have the

Delphi unit initialization not always called

↘锁芯ラ 提交于 2019-11-30 08:23:49
问题 I have a unit within a .bpl, and I need a stringlist for a new function that I wrote. I want to the stringlist to persist for the lifetime of the app, so that each call can build on what the prior call found. So it's declared globally within the unit, and I initialize it in the Initialization section, like this: var ProductLookup : TStrings; ... function foo : boolean; begin result := (ProductLookup.IndexOfName('bar') >=0); //blow up here. It's nil. Why? end; .... initialization ProductLookup

Delphi unit initialization not always called

泄露秘密 提交于 2019-11-29 06:37:16
I have a unit within a .bpl, and I need a stringlist for a new function that I wrote. I want to the stringlist to persist for the lifetime of the app, so that each call can build on what the prior call found. So it's declared globally within the unit, and I initialize it in the Initialization section, like this: var ProductLookup : TStrings; ... function foo : boolean; begin result := (ProductLookup.IndexOfName('bar') >=0); //blow up here. It's nil. Why? end; .... initialization ProductLookup := TStringList.Create; // This should get run, but doesn't. finalization FreeAndNil(ProductLookup);