when i use TZConnection in the same form this error doesnot show.
when i use TZConnection in the datamodule this error always show.
can you help me please.
lazarus 0.9.28
zeos 6.6.6
ubuntu 10.04
Database component is not assigned
Moderators: gto, bravecobra
I cannot reproduce this problem. I put ZConnection1 on DataModule1, set the properties so that it connects to data base, then I put ZReadOnlyQuery1 on form1, set ZReadOnlyQuery1.Connection to DataModule1.ZConnection1, set SQL to a select statement and everything works well.
Why do you use Lazarus version 0.9.28, which is more than two years old? Maybe the problem is there.
I tried with "stable" Lazarus 0.9.30.2 and 0.9.31 from trunk.
Does the problem appear in design time or in runtime?
Why do you use Lazarus version 0.9.28, which is more than two years old? Maybe the problem is there.
I tried with "stable" Lazarus 0.9.30.2 and 0.9.31 from trunk.
Does the problem appear in design time or in runtime?
-
- Expert Boarder
- Posts: 113
- Joined: 06.10.2006, 14:41
- Location: Chapecó - Santa Catarina
- Contact:
I know this is a response to an old thread but...
In my experience, when you get the "Database connection is not assigned" error, it means that you left a dataset (TZTable, TZQuery, whatever) in the "Active" (Active := True) state before running the program. IMO, this should not be a problem, but it happens to me quite frequently and that's what I've discovered quickly fixes the issue. Just go in, select 'em all, and set them to False and it will probably work after that-- assuming you really are hooking them up with a connection of course.
BTW, in case anybody's wondering, I'm using Zeosdb 7.4 something or other, a very recent copy from subversion, along with Lazarus 1.0.10. So this issue is definitely still around.
John
In my experience, when you get the "Database connection is not assigned" error, it means that you left a dataset (TZTable, TZQuery, whatever) in the "Active" (Active := True) state before running the program. IMO, this should not be a problem, but it happens to me quite frequently and that's what I've discovered quickly fixes the issue. Just go in, select 'em all, and set them to False and it will probably work after that-- assuming you really are hooking them up with a connection of course.
BTW, in case anybody's wondering, I'm using Zeosdb 7.4 something or other, a very recent copy from subversion, along with Lazarus 1.0.10. So this issue is definitely still around.
John