Recent

Author Topic: zeoslib - problem to open query  (Read 19222 times)

JanH

  • Guest
zeoslib - problem to open query
« on: February 28, 2006, 02:55:42 pm »
Hi,

now that I have installed the zeoslib in lazarus 0.9.12 (Windows XP SP2) I created a sample app.
I put a ZConnection and a ZReadOnlyQuery on my form and set the properties.
But everytime I want to activate the query crashes the app. At design time it will crash lazarus, at run time it crashes my app.

What's wrong? Anyone with the same problem?


add:

error: access violation -> runtime error 210 at $0050df59

matthijs

  • Hero Member
  • *****
  • Posts: 537
RE: zeoslib - problem to open query
« Reply #1 on: February 28, 2006, 04:35:35 pm »
Check if you are connecting to an existing db, check if server is running, check ...  etc etc.
It is very hard to tell what is wrong on your side if you do not give any information. :)
What's in a sig? Would my posting look less if it didnot have a sig? (Free after William S.) :)

:( Why cannot I upload my own Avatar? :(

Anonymous

  • Guest
RE: zeoslib - problem to open query
« Reply #2 on: March 01, 2006, 07:23:32 am »
okay, the database file exists, the connection seems to be okay because I set ZConnection.Active := true; and no error raises. I created a table for testing.
Other Properties are:

ZConnection:
database := C:\temp\test.gdb
hostname := localhost
passwort := <stdpw>
protocol := firebird-1.5
user := sysdba

ZReadOnlyQuery:
Connection := ZConnection
Datasource := Datasource
SQL := select * from test_table

Datasource:
DataSet := ZReadOnlyQuery

The debugger opens the ZDbcInterbase6Utils at line 1777 (2nd line in funtion GetVersion).

JanH

  • Guest
RE: zeoslib - problem to open query
« Reply #3 on: March 01, 2006, 07:26:27 am »
For ZConnection.Active I mean ZConnection.Connected

barko

  • New Member
  • *
  • Posts: 45
Re: RE: zeoslib - problem to open query
« Reply #4 on: March 01, 2006, 07:24:15 pm »
Quote from: "JanH"
For ZConnection.Active I mean ZConnection.Connected


JanH, which version of fpc do you use?

JanH

  • Guest
RE: Re: RE: zeoslib - problem to open query
« Reply #5 on: March 01, 2006, 07:32:47 pm »
The fpc version is 2.0.2. It's the version which is in the win32 installer of laz0.9.12.

don't pay attention on my post "...ZConnection.Active...". I just was accustomed to SQLQuery from SQLdb-lib. ;-)

barko

  • New Member
  • *
  • Posts: 45
RE: Re: RE: zeoslib - problem to open query
« Reply #6 on: March 01, 2006, 07:45:23 pm »
Good, because ZeosDBO doesn't work with fpc 2.0.2 and up.
I miss in sqldb some things that are in zeosdbo...

Like: ZUpdateSQL.DeleteSQL, ZUpdateSQL.InsertSQL, ZUpdateSQL.ModifySQL... or I can't find this functions in sqldb... this is usefull when user edit data in dbgrid...

JanH

  • Guest
RE: Re: RE: zeoslib - problem to open query
« Reply #7 on: March 06, 2006, 10:18:22 am »
What functions are ZUpdateSQL.* you wrote? And why they are so useful.

I also have a dbGrid where users can change data. if the changes should be saved I call IBConnection.Commit; (sqldb)

Anonymous

  • Guest
RE: Re: RE: zeoslib - problem to open query
« Reply #8 on: March 07, 2006, 04:24:32 pm »
I am using ZeosLib with latest lazarus and fpc2.1, but I needed to obtain the zeosdbo_rework (cvs files) and modify the compiler directives in zeos.inc. These changes have already been discussed in this forum. My biggest gripe is that whenever I am using the debugger, if I forget to reset the debugger before running my application then it generates an exception.

Anonymous

  • Guest
RE: Re: RE: zeoslib - problem to open query
« Reply #9 on: March 07, 2006, 10:04:40 pm »
Ha! I used to use the latest revisions of FPC and Lazarus, but since FPC build 2694, the integrated debugger has been broken in windows. It still works with FPC 2.0.2 and latest Lazarus.

barko

  • New Member
  • *
  • Posts: 45
Re: RE: Re: RE: zeoslib - problem to open query
« Reply #10 on: March 08, 2006, 10:49:47 am »
Quote from: "JanH"
What functions are ZUpdateSQL.* you wrote? And why they are so useful.


You define ModifySQL with update statement, InsertSQL with insert statement and DeleteSQL with delete statement... and other do zeos for you.

Example:

Code: [Select]

ZUpdateSQL.ModifySQL.text:='update tablename set field1=:field1, field2=:field2 where field3=:field3;';


When user change data in dbgrid (dbmemo), ZUpdateSQL update tables without any other programming... that is why is zeos for me very good...quick programming.

JanH

  • Guest
RE: Re: RE: zeoslib - problem to open query
« Reply #11 on: March 08, 2006, 11:30:14 am »
Guest...

can I anywhere download a latest compiled fpc? Or how can I compile the latest fpc-sources?
I'm desperating but I absolutley want to use the zeos-lib ;-)

barko

  • New Member
  • *
  • Posts: 45
RE: Re: RE: zeoslib - problem to open query
« Reply #12 on: March 08, 2006, 11:45:55 am »
You can download latest fpc 2.1.1 from svn. Look here www.freepascal.org (Development). FYI: from today svn i can confirm that zeosdbo is useable again ... ;) without patched Zeos.ini file... Ihaaaaaaaaaa :) Thanks to fpc dev team!

Anonymous

  • Guest
RE: Re: RE: zeoslib - problem to open query
« Reply #13 on: March 08, 2006, 01:22:26 pm »
Okay, I downloaded the latest fpc, compiled it with my current fpc. Then I replaced the compiled ppc.exe with the ppc386.exe. But if I try to compile a project there comes a compiler-error: Illegal paramter -TWin32... :-(

barko

  • New Member
  • *
  • Posts: 45
RE: Re: RE: zeoslib - problem to open query
« Reply #14 on: March 08, 2006, 01:39:35 pm »
I think that you must compile with fpc 2.1.1? Try to compile with this http://ftp://ftp.de.freepascal.org/pub/lazarus/Lazarus-0.9.13-20060308-win32.exe snapshot.

compile with this command's from command line (cmd):

cd path_to_fpc_source
make clean all
make install INSTALL_PREFIX=c:\lazarus\path_to_exist_fpc_dir

(i think that is c:\lazarus\pp..)

 

TinyPortal © 2005-2018