| View previous topic :: View next topic |
| Author |
Message |
Jan-Christian Lupander Guest
|
Posted: Sat Jan 10, 2004 10:48 am Post subject: TClientDataSet / Locked SafeArray problem |
|
|
Hi,
Having recently "upgraded" from Delphi6 Enterprise (Educational) to Delphi7
Professional I'm running up against a real showstopper: I can't get
TClientDataSet to work!
When I try to open them, even in basic testapplications, I get "Variant or
safe array locked".
The same applications run ok under Delphi 6, which I still have installed.
I tried a Delphi 7 repair-installation, no change.
I installed Delphi 7 on a friends Compaq desktop, no problems! (My normal
computer is a Dell laptop)
My BDE- and Advantage-based applications work without any problems in both
the Delphi6 and -7 environments without any problems.
So I either have a hardware related problem or something is askew in the
software environment in my laptop (Dell Inspiron 5000e, 700MHz, 512M of
memory, lots of free diskspace, Win XP)
Any suggestions on solutions or where I should start to look?
Thanks in advance!
Jan-Christian
|
|
| Back to top |
|
 |
Bill Todd (TeamB) Guest
|
Posted: Sat Jan 10, 2004 2:00 pm Post subject: Re: TClientDataSet / Locked SafeArray problem |
|
|
On Sat, 10 Jan 2004 11:48:41 +0100, "Jan-Christian Lupander"
<janskip.thislupander (AT) pp (DOT) inet.fi> wrote:
| Quote: | Any suggestions on solutions or where I should start to look?
|
Change your path so that the D7 directories are searched before the
D6 directories.
--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
|
|
| Back to top |
|
 |
Jan-Christian Lupander Guest
|
Posted: Sat Jan 10, 2004 5:13 pm Post subject: Re: TClientDataSet / Locked SafeArray problem |
|
|
D7 was already in the first and second entries in the path environmental
varible.
Removing D6 altogether from the path didn't help.
I cannot find any other paths where both D6 and D7 directories appear.
BTW, wouldn't a switching of places in the path, if successful, result in D6
having the problems I'm now trying to get fixed in D7?
Jan-Christian
"Bill Todd (TeamB)" <no (AT) no (DOT) com> skrev i meddelandet
news:hb1000188k2a71udorrcrqr276qi46nk87 (AT) 4ax (DOT) com...
| Quote: | On Sat, 10 Jan 2004 11:48:41 +0100, "Jan-Christian Lupander"
[email]janskip.thislupander (AT) pp (DOT) inet.fi[/email]> wrote:
Any suggestions on solutions or where I should start to look?
Change your path so that the D7 directories are searched before the
D6 directories.
--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
|
|
|
| Back to top |
|
 |
Bill Todd (TeamB) Guest
|
Posted: Sat Jan 10, 2004 7:07 pm Post subject: Re: TClientDataSet / Locked SafeArray problem |
|
|
On Sat, 10 Jan 2004 18:13:21 +0100, "Jan-Christian Lupander"
<janskip.thislupander (AT) pp (DOT) inet.fi> wrote:
| Quote: | BTW, wouldn't a switching of places in the path, if successful, result in D6
having the problems I'm now trying to get fixed in D7?
|
It should not. Search your hard drive and remove any copies of
MIDAS.DLL whose version does not match the version that came with D7.
Also, make sure you have all of the updates from the D7 registered
users area installed.
--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
|
|
| Back to top |
|
 |
Jan-Christian Lupander Guest
|
Posted: Sat Jan 10, 2004 8:22 pm Post subject: Re: TClientDataSet / Locked SafeArray problem |
|
|
Finally some progress!
I deleted all the D6 midas.dlls floating around and now the error when
opening a CDS is "Error loading MIDAS.DLL".
Midas.dll is located in WINNTSystem32. I tried with it copied to the same
folder where my testprogram is but the error didn't change.
I don't have the D7 updates but they are missing from the computer where my
programs work too, and D7 on both units comes from the same CD. Anyway,
tomorrow I'll get the updates.
Jan-Christian
"Bill Todd (TeamB)" <no (AT) no (DOT) com> skrev i meddelandet
news:9aj00092u5u31prv9j6kon3f6o6l2sams9 (AT) 4ax (DOT) com...
| Quote: | On Sat, 10 Jan 2004 18:13:21 +0100, "Jan-Christian Lupander"
[email]janskip.thislupander (AT) pp (DOT) inet.fi[/email]> wrote:
BTW, wouldn't a switching of places in the path, if successful, result in
D6
having the problems I'm now trying to get fixed in D7?
It should not. Search your hard drive and remove any copies of
MIDAS.DLL whose version does not match the version that came with D7.
Also, make sure you have all of the updates from the D7 registered
users area installed.
--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
|
|
|
| Back to top |
|
 |
Bill Todd (TeamB) Guest
|
Posted: Sat Jan 10, 2004 9:04 pm Post subject: Re: TClientDataSet / Locked SafeArray problem |
|
|
Register MIDAS.DLL with regsvr32.exe and everything should work.
--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
|
|
| Back to top |
|
 |
Jan-Christian Lupander Guest
|
Posted: Sun Jan 11, 2004 8:54 am Post subject: Re: TClientDataSet / Locked SafeArray problem |
|
|
That did it!
Many thanks for your help!
No way I could have solved it by myself!
Which brings up a related question:
Midas.dll has bugged me before, in Advantage-based applications when I added
graphic display of results, to pick one example. Originally I tought Midas
was used only in multitiered applications but obviously that is not the
case. Can you give me a pointer where I can learn more about Midas in this
"everyday" environment?
Thanks again!
Jan-Christian
"Bill Todd (TeamB)" <no (AT) no (DOT) com> skrev i meddelandet
news:46q000puj0biagkjuqb688jmlho4rbt7tp (AT) 4ax (DOT) com...
| Quote: | Register MIDAS.DLL with regsvr32.exe and everything should work.
--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
|
|
|
| Back to top |
|
 |
Bill Todd (TeamB) Guest
|
Posted: Sun Jan 11, 2004 2:43 pm Post subject: Re: TClientDataSet / Locked SafeArray problem |
|
|
| Quote: | Which brings up a related question:
Midas.dll has bugged me before, in Advantage-based applications when I added
graphic display of results, to pick one example. Originally I tought Midas
was used only in multitiered applications but obviously that is not the
|
MIDAS.DLL is required whenever you use a ClientDataSet. If you do not
want to distribute MIDAS.DLL just add the MidasLib unit to the uses
clause of any form or data module in your application (I use the main
form).
| Quote: | case. Can you give me a pointer where I can learn more about Midas in this
"everyday" environment?
|
As I said, it is not Midas (which is now called DataSnap) but rather
TClientDataSet that requires MIDAS.DLL. I am not sure exactly what you
are looking form but there are papers on using ClientDataSet on the
Borland Web site. Search using Google.
--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
|
|
| Back to top |
|
 |
Jan-Christian Lupander Guest
|
Posted: Mon Jan 12, 2004 8:04 am Post subject: Re: TClientDataSet / Locked SafeArray problem |
|
|
It was the use/need of Midas.dll in "non Midas/DataSnap" applications I was
interested in. In a previous case I found out the hard way that it was
necessary to distribute Midas.dll in the .exe folder of an application in
order to get the result graphics to work, now I learn I needed to register
it with regsrvr32 in order for a ClientDataSet application to work (or
include MidasLib in the uses clause). It gives a very unsecure feeling to
have "Midas" pop up in what for me, so far, has been unexpected places. I
wondered if something had been written on the subject. I have read a lot
about the use of TClientDataSet but cannot remember having seen this need of
Midas.dll/MidasLib mentioned. Perhaps I have just been blind!...
But, Ok, now I have some kind of base to start from. Thanks again!
Jan-Christian
"Bill Todd (TeamB)" <no (AT) no (DOT) com> skrev i meddelandet
news:r1o200l6dmr99kiu2iaqfggukhro1mii8f (AT) 4ax (DOT) com...
| Quote: | Which brings up a related question:
Midas.dll has bugged me before, in Advantage-based applications when I
added
graphic display of results, to pick one example. Originally I tought
Midas
was used only in multitiered applications but obviously that is not the
MIDAS.DLL is required whenever you use a ClientDataSet. If you do not
want to distribute MIDAS.DLL just add the MidasLib unit to the uses
clause of any form or data module in your application (I use the main
form).
case. Can you give me a pointer where I can learn more about Midas in
this
"everyday" environment?
As I said, it is not Midas (which is now called DataSnap) but rather
TClientDataSet that requires MIDAS.DLL. I am not sure exactly what you
are looking form but there are papers on using ClientDataSet on the
Borland Web site. Search using Google.
--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
|
|
|
| Back to top |
|
 |
Bill Todd (TeamB) Guest
|
Posted: Mon Jan 12, 2004 12:58 pm Post subject: Re: TClientDataSet / Locked SafeArray problem |
|
|
The _only_ time you need to distribute MIDAS.DLL is if your
application uses TClientDataSet or if it is a DataSnap (formerly
Midas) server.
--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
|
|
| Back to top |
|
 |
Jan-Christian Lupander Guest
|
Posted: Mon Jan 12, 2004 6:23 pm Post subject: Re: TClientDataSet / Locked SafeArray problem |
|
|
Yes, right you are, of course!
My previous problemcase with an application needing midas.dll in order to
show QuickReport output as graphics, which I blamed on the TeeGraphics
component used, proved on closer inspection to be caused by my own
introduction of a ClientDataSet on one of the forms involved.
Thanks Bill, for all the help!
Jan-Christian
"Bill Todd (TeamB)" <no (AT) no (DOT) com> skrev i meddelandet
news:ue650097dnenp2lq7ofnn3f46peo3d6u6s (AT) 4ax (DOT) com...
| Quote: | The _only_ time you need to distribute MIDAS.DLL is if your
application uses TClientDataSet or if it is a DataSnap (formerly
Midas) server.
--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
|
|
|
| Back to top |
|
 |
|