delphi-7

DEP preventing my COM DLL from working

▼魔方 西西 提交于 2020-01-25 03:14:28
问题 I'm trying to use a COM DLL (written in Delphi 7) within my Delphi 7 IntraWeb application but it's failing due to DEP. I'm pretty much certain it's DEP that is preventing me from using the DLL because if I compile and run my IntraWeb app as a StandAlone Server, everything works fine. But, compiling and runnning it as an ISAPI DLL, it fails. On WinXP (using IIS 6) I can add DllHost.exe to DEP and everything works. Of course, I really don't want to do that. On Win7/2008 (IIS 7) this isn't an

Checking whether there are <input> object attribute values in the HTML Code using Delphi

一笑奈何 提交于 2020-01-24 04:07:25
问题 How do I check whether there are input object attribute values in HTML Code using Delphi? there isn't value attribute. <input name="input1" type="text"/> there is value attribute. <input name="input1" type="text" value=""/> I've tried the following if WebBrowser1.OleObject.Document.GetElementByID('input1').getAttribute('value')<>nil then ShowMessage('value attribute is available') else ShowMessage('value attribute isn"t available') 回答1: I thought that I'd put this up as an answer as it took

Delphi 7 tguid compare

拈花ヽ惹草 提交于 2020-01-22 18:49:04
问题 Is any other way to compare 2 TGUID elements, except transform them into strings (the guidtostring function) and after evaluate the expression, in Delphi 7? 回答1: You can use IsEqualGUID API declared in SysUtils. 回答2: IsEqualGUID() (or IsEqualIID()), like TOndrej suggested. You can also use SysUtuils. CompareMem() instead, since TGuid is a binary array of bytes. 来源: https://stackoverflow.com/questions/4012581/delphi-7-tguid-compare

Preferable way to write Delphi database apps with transactions & data-aware components

匆匆过客 提交于 2020-01-22 14:04:17
问题 What is the preferable way to write Delphi database applications using transactions and also data-aware components? I have to write a client app that access InnoDB tables, and do some master-detail kind of things inside transactions. After doing some research on transactions (from general point-of-view), then I humbly make a conclusion that non data-aware components and hand-coded SQL would be the "perfect match" of transactions; But the data-aware components wouldn't be. They don't seem to

Preferable way to write Delphi database apps with transactions & data-aware components

大城市里の小女人 提交于 2020-01-22 14:02:51
问题 What is the preferable way to write Delphi database applications using transactions and also data-aware components? I have to write a client app that access InnoDB tables, and do some master-detail kind of things inside transactions. After doing some research on transactions (from general point-of-view), then I humbly make a conclusion that non data-aware components and hand-coded SQL would be the "perfect match" of transactions; But the data-aware components wouldn't be. They don't seem to

IP Address String Routines in Delphi?

被刻印的时光 ゝ 提交于 2020-01-22 12:58:11
问题 I'm looking for a way in Delphi to validate and manipulate IP Addresses. Some of the things it should be able to do is... Verify that a string is a valid IP address Verify that a string is a valid subnet mask Verify that an IP address is within a given Subnet Some type (record or string or whatever) which is meant for storing an IP address Basic conversion of an IP address types, such as String or Array[0..3] of Byte Any other IP address routines that can make IP manipulation easier The basic

Cannot perform this operation on a closed dataset

孤人 提交于 2020-01-21 14:45:31
问题 I am just trying to execute the "select" sql statement using TADOQuery component, but when TADOQuery's "Open" statement is executing I am getting following error: Cannot perform this operation on a closed dataset... ADOQuery1.Active := False; ADOQuery1.SQL.Clear; ADOQuery1.SQL.Add('Select * from Table1 where Column1 = <value>'); ADOQuery1.Open; Any guess why I am getting this error ? 回答1: Your code looks fine. Check if there are any event handlers (OnBeforeOpen) or master/detail datasources

Prevent methods with empty bodies from deletion on save

丶灬走出姿态 提交于 2020-01-21 11:19:07
问题 It's quite a contradictory habit of mine to press Ctrl+S permanently. The negative side is that delphi deletes empty functions/procedures on save. Is there a way to prevent IDE from deleting functions/procedures with empty bodies on save? 回答1: Converted from the comment as per OP request. My comment is too tiny for an answer, so I'm going to add few details maybe already obvious to an OP. This happens with event handlers only¹. Write them without delay or comment them with todo ² ¹ That is,

Adding a unit automatically to the project

血红的双手。 提交于 2020-01-21 05:06:10
问题 I am working on a component in Delphi 7 and Delphi 2006 , where I am using a unit which I need to add to the .dpr file of the project on which the component is dropped automatically. Like the way Eureka Log automatically adds the unit 'ExceptionLog' to the project file: Can anyone tell me how to programmatically add a unit to the project file when I drop my component on any form in the project? 回答1: You most likely have to use the Open Tools API for that. Also it might require to write a

Adding a unit automatically to the project

不羁的心 提交于 2020-01-21 05:05:06
问题 I am working on a component in Delphi 7 and Delphi 2006 , where I am using a unit which I need to add to the .dpr file of the project on which the component is dropped automatically. Like the way Eureka Log automatically adds the unit 'ExceptionLog' to the project file: Can anyone tell me how to programmatically add a unit to the project file when I drop my component on any form in the project? 回答1: You most likely have to use the Open Tools API for that. Also it might require to write a