Database creation problem

You can post here questions about usage of an already compiled release of gestinux, downloaded on SourceForge.
Give the version of gestinux and of you operating system.

Please use the development forum if you have compiled yourself.
Post Reply
krle
Posts: 4
Joined: 02 Jun 2013, 21:59

Database creation problem

Post by krle »

Hello, I successfully compiled the program and first, after analyizing code I tried to connect to firebird DB, there was an error. Okay, I thought that FB is not supported, then I tried with PostgreSql 9.2, when I enter parameteres I get the message:

Database was defined with a gestinux version older than the version you are using (1.0-rc-1). Do you want to check it and upgrade if requested ?

If I click Yes I get the following error:
Error creating database trigger trg_journals
SQL Error: ERROR: function upd_row() does not exist
CREATE TRIGGER trg_journals AFTER UPDATE ON journals FOR EACH ROW EXECUTE PROCEDURE upd_row();
Then:
Unable to connect to the server localhost with username postgres (Operation aborted)


I ve read the manual stating that I should connect to test DB with these parameters:
[Connect Test]
Protocol=mysql-5
Database=Test
Hostname=gestinux.mrit.com
Port=0
Username=test
Password=44454687788687474849

I tried also this and it says it can't connect :(

Thx in advance!
tintinux
Site Admin
Posts: 169
Joined: 21 Jun 2012, 19:07
Location: Blois (France)
Contact:

Re: Database creation problem

Post by tintinux »

Hi

No, Firebird is not currently supported.
I have never used this DB and I have currently no time to add a third DBMS.
If it is important for you, feel free to add yourself Firebird to the supported DBMS (in the trunk version only).
If you have questions about the way to achieve this, please open another topic in the development forum.

With PostgreSql it was used to work, but there is certainly something wrong today.
A function upd_row() used by the trigger is not created on a new DB and I do not know why...
Please create an entry in the bugtracker.
I might try to fix it asap, but if you can do it, it will help a lot, because I have not much time free.
As a workaround you could find in the sources the definition for this function, create it in the DB yourself, and retry.

For MySql, see next message.

Thanks for your patience !

Tintinux
Cordialement,

Tintinux
tintinux
Site Admin
Posts: 169
Joined: 21 Jun 2012, 19:07
Location: Blois (France)
Contact:

Re: Database creation problem

Post by tintinux »

Hi

I have checked and I don't find problem with the parameters you writed down.
Hostname=gestinux.mrit.com is working and was not removed as I feared.

Maybe another issue with your installation ?
Tell me the exact message you get, your OS and as much information as you can, and we will solve this issue.

Regards
Tintinux
Cordialement,

Tintinux
krle
Posts: 4
Joined: 02 Jun 2013, 21:59

Re: Database creation problem

Post by krle »

Hi tintinux,
Thanks for your quick reply. I m new to opensource comunity so have patience with me :)

I ve tried yesterday with new address that you gave me and it couldn't connect. Minute ago, I ve tried to enter the gestinux.mrit.com server and I get the folowing message:

Unable to connect to the server gestinux.mrit.com with username test (SQL Error: Access denied for user 'test'@****.dynamic.isp.telekom.rs' (using password: YES))

No problem, I ve analyized the code and successfully created DB with PostgreSql :)

I m using 1 05beta version of code and made the folowing changes:

First I ve changed the LONGTEXT to TEXT, i m using Postgres 9.2 and documentation says it uses only TEXT data type.

1 .gdbconnection.pas line 611 - ftMemo: Result := 'TEXT';

Then it made Assert exception

2.gdbconnection.pas line 400 Assert(DbConnection.getDbmstype <> DBMS_MySql) changed from =
EDIT: This is temporary change. Please can you tell me why you used Assert procedure here?

Now I can connect to DB, but I have another problem. When I click to Companies menu item I get the folowing message:

A database query failed (SQL Error: ERROR: SELECT FOR UPDATE/SHARE cannot be applied to the nullable side of an outer join SELECT CY.FullCompanyName,CY.Address1,CY.Address2,CY.City,CY.PostCode,CT.CountryCode,CT.CountryName, CY.FiscalIdentification1,CY.FiscalIdentification2,CY.Email,CY.Phone,CY.InvoiceEncoding,CY.NextInvoiceNumber FROM Company CY LEFT OUTER JOIN Countries CT ON CT.CountryCode = CY.CountryCode AND UserLanguage = 'en_US')

I read it's a PostgreSql limitation. But an interesting thing is happening, I ve installed Release Candidate 1.0 RC version of Gestinux and from there company query works ok.

Now I m trying to find PostgreSQL profiler to see what SQL text is beign executed, clearly RC works fine :)

Thank you once again!

EDIT: My computer runs on Win7 64 bit, Lazarus 32 fpc 32 compiler.
tintinux
Site Admin
Posts: 169
Joined: 21 Jun 2012, 19:07
Location: Blois (France)
Contact:

Re: Database creation problem

Post by tintinux »

Hi
Thanks for your quick reply. I m new to opensource comunity so have patience with me :)
You are welcome !

I ve tried yesterday with new address that you gave me and it couldn't connect. Minute ago, I ve tried to enter the gestinux.mrit.com server and I get the folowing message:
Unable to connect to the server gestinux.mrit.com with username test (SQL Error: Access denied for user 'test'@****.dynamic.isp.telekom.rs' (using password: YES))
So up to now, you can't access to the MySql Test database on gestinux.mrit.com ?
I just tried and it works fine...
Did you merely tried to drag and drop the configuration file on the Parameters/Database windows ?


I will try to reply soon to the other questions...

Regards

Tintinux
Cordialement,

Tintinux
krle
Posts: 4
Joined: 02 Jun 2013, 21:59

Re: Database creation problem

Post by krle »

Hi, yes I ve tried to drag 'n drop the text file, nothing happens, then I ve mannualy added the parameters and it says Unable to connect.

No problem, I can work with the local DB at the moment, DB creation works fine :)

Don't worry, I know you're busy, take your time.


EDIT: Ive tried to upload image I get the folowing message:
Could not upload attachment to ./files/92_327e5d0188b76b6a44c0134c06fc8fbc.

Image

BR
Krle
tintinux
Site Admin
Posts: 169
Joined: 21 Jun 2012, 19:07
Location: Blois (France)
Contact:

Re: Database creation problem

Post by tintinux »

So, now I understand what happens !

Sourceforge has made some nasty error recently :twisted: and was showing since a few days a wrong repository. It was dated from July 2012.
If you have compiled with these sources, the errors you got was existing. They have been corrected now.
This explain that the RC-1 executable was working fine.

Last night SourceForge have restored the correct repository, and it should work normally.
You will find a branch 1.0 which can make the RC-1, and a trunk which is the same excepted 2 recent small bug fixes that I will copy soon from 1.0.
Do not use the branch 0.5 which is becoming obsolete.

Let me know if this solve all you issues.
If you have ussues during or after a compilation, please open a topic in de development forum.

Regards.
Cordialement,

Tintinux
krle
Posts: 4
Joined: 02 Jun 2013, 21:59

Re: Database creation problem

Post by krle »

Ok, now it's working :)


Just a little shortcut for those who are comiling and connecting to PostgreSql.

If you (when establishing connection) receive error msg about missing .dll library, be sure to add the bin folder of Postgre to Windows PATH. Right click on My computer > Advanced System Settings > Environment variables.

Krle
Post Reply