[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

MIDAS & DLLS...

Posted on 1998-10-06
1
Medium Priority
?
319 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
[X]
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
1 Comment
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 100 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

649 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