Solved

MIDAS & DLLS...

Posted on 1998-10-06
1
308 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

758 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now