Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

MIDAS & DLLS...

Posted on 1998-10-06
1
310 Views
Last Modified: 2010-04-06
I have created a dll with a form inside of it.  Onclick of one of the buttons. I want to hit the DB using MIDAS controls.  I know I have set the server up correctly, because i have tried to hit it on a normal form (not in a dll) and it works fine.  In my dll, I drop a DCOMConnection, ClientDataSet, and DataSet on my form.  I hooked my DCOMConnection to the server, the Client Dataset to the DCOMConnection and the DataSet to the ClientDataSet.  I can Connect and Disconnect the DCOMConnection all day while I am in desgin mode.  Once in run mode, I will call the dll and everything is fine, but as soon as I do anything that deals with connecting to the server, I get a "CoInitialize Has Not Been Called".  What am I doing wrong?

Also, I first had these components on a datamodule inside of the dll and when I tried to access the db, I got a FFFFFFFFF error.  My datamodule is in front of the form in the creation order (atleast it is first in the uses clause in the project source).  Why would I get this error?

Any help appreciated...

Michael
0
Comment
Question by:MichaelB082598
1 Comment
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 50 total points
ID: 1342097
Call CoInitialize in the DPR project unit - this will stop the error about coinitialize not being called.

The other error you mention sounds like an access violation. Check that the data module created (ie: There is a call to create the DataModule in your dll main unit.

Cheers,

Raymond.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi TcxGrid group footer summary 3 317
When I am typing into a TEdit last word repeats 7 147
Delphi 2 69
Unique identifier on a terminal server (rdp) 4 67
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

837 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question