Page 1 of 1

D7 IDE Hangs on compile using examples

Posted: 10.10.2006, 08:33
by andyhill
--------------------------------------------------------------------------------
Hi to all.

Just installed ZeosLib 6.5.1-alpha CVS-Version into D7 - all went OK.

Opened several supplied example projects and even though we can connect to and retrieve data from MySQL in IDE when I try to compile/build D7 hangs. Please advise

---------------------------------------------------------------------------------

Creating a fresh project I can compile/run and insert/delete/modify as one would expect.

Is there a fancy way of getting back a records AutoInc id after an insert using an ZSqlUpdate object bound to ZQuery (please send sample code if there is) ?

Thanks in advance

Andy

Posted: 10.10.2006, 09:38
by fduenas
Hi
Be sure you have latest zeosLib 6.5.1 SVN version (not cvs, cvs is very old), it must be at least rev 98 or 102'
.
Check also if zeos is not loading a libmysql.dll that does not correspond to the mysql server version you're using. to be more sure that you're loading the correct libmysql.dll, copy the one located in <MYSQL server instalation dir>\bin to the example folder. Also you can rename libmysql.dll to libmysql323.dll, libmysql41.dll or libmysql50.dll depending of the protocol used will help to load the correct libmysql.dll

To refresh an AutoInc field when using TZUpdateSQL after inserting a new record, use the Event TzUpdateSQL.OnAfterInsertStatement, In this event there is an output variable named UpdatAutoIncrementFields, withting the event assign it a avalue of true.

Also Be sure you have in TzQuery.Options enabled the doCalcDefaults option.

Posted: 10.10.2006, 21:47
by andyhill
I see no parameter in this event

procedure TForm1.ZUpdateSQL1AfterInsertSQL(Sender: TObject);
begin
//PostMessage(Handle, CM_QUERY_REFRESH, 0, 0);
end;

(TzQuery.Options doCalcDefaults enabled)

Posted: 10.10.2006, 22:48
by andyhill
Updated to latest code.

Example compiles OK.

Love the new OnAfterInsertStatement.

Thanks for all your hard work. I look forward to many more new innovations.

Posted: 11.10.2006, 05:29
by fduenas
I'm glad you finded functional. Plz stay updated with latest SVN version, today the latest is rev. 112, and seems to fix some memory leaks and errors. Also help us tetsing new features and to improve zeos.
Regards