delphi

How to avoid circular notifications in MVC in Delphi?

I am trying to use the Model-View-Controller pattern in a small application. The model contains some data and a selection like this TModelSelection = record CurrentItem : TItem; end; TModel = class public property Items : TList <TItem>; property Selection : TModelSelection; property Subject : TSubject <TModel>; // Observer...

Maximum number of dbprocesses already allocated

I'm running a Delphi application that uses BDE for database connection. Ocassionally (more often than I'd like) this error pops up when opening a query. Googling for this error, most picks refer to MS SQLServer database, and speak about a dbsetmaxprocs function, which I can't seem to find. So the question is: how can I prevent/correct ...

delphi using SQL Server with WMI

Hi, I need to determine the sql server instances (local) as part on an installer. Does anyone have any code how I can do this with WMI and Delphi? JD. ...

WIX installer with delphi custom actions

Hi, We are writing custom actions using Delphi and wanted to know if there would be any issues with the following or whether one way would be better than the other. Using WMI to determine if SQL server is installed and getting the SQL server instance names. If there is an issue with WMI (exception raised), then use SQLDMO. Using WMI t...

Adoconnection asks for userid and password when opened Delphi

I am trying to open an ADOConnection component. The database is in MDB format. I use JET to access it. Whenever I use AdoConnection.Open in my code the window pops up and asks for userid and pass. I enter "Admin" for userid and leave password empty, and it works, but I don't want this window to pop up. I tried using AdoConnection.Open('A...

Simple wrapper function for WinInet post (in Delphi)

Here is a way to do an HTTP post using Indy, in one line, more or less: Response := FIdHttp.Post(URL, StringStream); Is there a function out there (function, not library) that allows the equivalent to be done using WinInet? Preferably, a function that resembles this: function PostUsingWinInet(const URL, Data :string; SSL :boolean) :...

Delphi Child Class

Hi everyone, it's a dumb question i think..But.. When a declare a child class of a other class in Delphi, is the childs gets directly the parents methods? explanations: A class named 'P' is parent of a class named 'C', the 'P' class has a method called 'Mth'. Is it possible to call 'C.Mth' or do i notice something in the declaration of '...

Odd behaviour with components with akRight alignment

In one customer computer (windows vista) almost all forms of my app are oddly unnaligned. Making some investigation I noticed that every component with akRight anchor acts oddly, being positioned way more for the right. Searching in SO I found this issue wich is similar to mine but not exacly the same. Since I cannot reproduce the iss...

What does ShFileOperation do when the recycle bin is full?

I use this procedure: function MoveToRecycle(sFileName: widestring): Boolean; var fos: TSHFileOpStructW; begin FillChar(fos, SizeOf(fos), 0); with fos do begin wnd := 0; wFunc := FO_DELETE; pFrom := PWideChar(sFileName + #0 + #0); pTo := #0 + #0; fFlags := FOF_FILESONLY or FOF_ALLOWUNDO or FOF_NOCONFIRMATIO...

[Delphi] RangeCheckError in JEDI WSCL

Hi, I'm using JEDI WSCL to change permissions on a folder during installation. When compiling without Optimization, and with Range Checking, I get a rangecheck when setting the new Access Control List. procedure SetFilePermissions(const folder: string); var FileObject: TJwSecureFileObject; DACL: TJwDAccessControlList; begin File...

Ensuring functions within a webservice are secure in delphi

I am in the process of designing a server side webservice dll which will be accessible by developers from other companies to access data on a central server. the issues i need to consider are - ensuring they only see the data which they are allowed to see - allowing them to upload/ download files. again only ones they are allowed to. I ...

Delphi 2006 Application messing up the GUI on Windows 7

Hi. I've been searching the Internet for a solution. Also here on Stackoverflow. But I haven't had any luck so far. We're having a problem with a Delphi 2006 application running on Windows 7. Some ComboBoxes are not shown. The exactly same application runs fine on Windows XP. I been trying to locate any patches. Do any one of you kno...

Delphi-5 single-file storage solution?

Hi! Is there a Delphi-5 solution to easily integrate single-file storage into existing code? I would like to have files like Java *.jar or Openoffice document files which are zipped/compressed files and folders but with their own file extension. Edit: I know some ZIP capable components but in a nutshell I want to access files within th...

Can i create a custom HTTP protocol in Delphi ?

I build a project using Flash and Delphi. In Flash i need communication with delphi. Current i use ExternalInterface and FSCommand. Now i need Flash communication with Delphi via HTTP but it need open a custom port on Delphi and it can prevent by user's firewall. I see a product called F-IN-BOX it can implement HTTP link like http://FLV/...

How do I get the handle for locking a file in Delphi?

The LockFile API takes a file handle. I normally use TStream for file access, so I'm unsure how to get the appropriate handle, given an ANSIString filename only. My purpose is to lock a file (which may not exist originally) during a process, write some information to other users, and then unlock and delete it. I would appreciate sample...

encryption algorithm for the application

What encryption algorithm is better to use? client-Delphi, server-Python. Recommend please simple algorithms and libraries .. ...

How do I draw zoomed text without changing effective text width?

I have some code that does custom drawing. Basically it is form fill program that has a WYSIWYG editor. The editor allows a zoom level to be set. I am having problems with the width of my labels jumping to different sizes relative to everything else on the form. An example of the code I am using to output the text is below. I'm pret...

generalized request function in DataSnap 2010 ?!?

This is a client-side function i'm trying to build, more generalized, which will allow me to call different server-side procedures which return TDBXReader. Right now it works, BUT i'm facing couple of problems and i need your help: (most important) what do you think about this aproach ? any suggestions/advices ? how can i free the vLCl...

Connecting to SQL Server using Delphi and dbExpress

I use RAD Studio 2010 including latest updates 4 and 5, my database is SQL Server Express. I set up a TSQLConnection but it won't connect, error message is "DBX-Error: the driver could not be initialized correctly. A client library may be missing, may not be installed correctly, or may have the wrong version" (error messagetranslated fr...

Delphi 2009 compared to Delphi 2010

Currently we use Delphi 2007 because our application and some of our components are not compatible with Unicode. If and when we upgrade is it better to jump directly to Delphi 2010? Propably, but I wonder if there is other compability issues except unicode? How is performance, memory requirements and stability of those versions? ...