Search found 56 matches

by jjeffman
12.07.2013, 03:25
Forum: 6.6 - stable
Topic: TZConnection is always in transaction state
Replies: 15
Views: 12003

I will try your suggestion

Hello Jan.

I will try your suggestion.

It is strange, when AutoCommit is false InTransaction is true, so I can not call StartTransaction. Well I will see in a test application how it works.

Kind Regards.
by jjeffman
10.07.2013, 23:48
Forum: 6.6 - stable
Topic: TZConnection is always in transaction state
Replies: 15
Views: 12003

I am sure you are right.

Hello Jan, I am sure you are right. Could it be this way ? ZConnection.AutoCommit := true; ZConnection.Connect; // Connect and start transaction => InTransaction = False ZConnection.ExecSQL('insert into exampletable (ID, FIELDNAME) values (1, ''Test'')'); // Execute and due to AutoCommit = true comm...
by jjeffman
08.07.2013, 19:50
Forum: 6.6 - stable
Topic: SQLite foreign_keys issue
Replies: 14
Views: 5366

Your patch is working fine

marsupilami,

Your patch is working fine, and the exceptions are being raised properly.

I have forgotten of compiling the Zeos components, that's why the application was not raising any exception.

Kind regards
by jjeffman
06.07.2013, 18:09
Forum: 6.6 - stable
Topic: TZConnection is always in transaction state
Replies: 15
Views: 12003

What AutoCommit is it for ?

Hello marsupilami, Exactly, InTransaction is responsible for tell if there is an active transaction or not. I do not agree on the way Zeos has implemented the transactions blocks. What the AutoCommit parameter stands for ? I think, IMHO, that when you set it to true after every call to the Post or D...
by jjeffman
06.07.2013, 17:46
Forum: 6.6 - stable
Topic: SQLite foreign_keys issue
Replies: 14
Views: 5366

I am not sure

Hello marsupilami,

I am not sure because no exception was raised when I have pressed the delete button of my application, although the record was not deleted.

Kind regards.
by jjeffman
05.07.2013, 15:31
Forum: 6.6 - stable
Topic: SQLite foreign_keys issue
Replies: 14
Views: 5366

I am not whitin a transaction

Hello marsupilami,

As a matter of fact I am not whitin a transaction, I have just connected to the SQLite database.

The TZConnection::AutoCommit is set to false and I have not started an explicit transaction, so I can not undrstand why the SQL commando does not work.

Kind regards.
by jjeffman
05.07.2013, 13:07
Forum: 6.6 - stable
Topic: TZConnection is always in transaction state
Replies: 15
Views: 12003

I disagree

I strongly disagree. When you connect to a database there ara no any transaction in course, just the connection was made. Have a look on the Borland CBuilder / Delphi help file and look for the InTransaction property. You will see that InTransaction is true in the following situations : 1. AutoCommi...
by jjeffman
04.07.2013, 21:34
Forum: 6.6 - stable
Topic: SQLite foreign_keys issue
Replies: 14
Views: 5366

SQLite foreign_keys issue

Hello, I am using Zeos to connect to a SQLite database ( protocol=sqlite-3 ). According to SQLite website http://www.sqlite.org/pragma.html#pragma_foreign_keys SQLite do not enable foreign keys by default, we need to enable it on every connection running a SQL command "PRAGMA foreign_keys = ON&...
by jjeffman
04.07.2013, 16:00
Forum: 6.6 - stable
Topic: TZConnection is always in transaction state
Replies: 15
Views: 12003

ZConnection.pas GetInTransaction code

Hello, I have given a look in ZConnection.pas file and I found the GetInTransaction function definition : {** Checks is the connection started a transaction. @returns <code>True</code> if connection in manual transaction mode and transaction is started. } function TZConnection.GetInTransaction: Bool...
by jjeffman
03.07.2013, 20:37
Forum: 6.6 - stable
Topic: SQLite timestamp problem
Replies: 5
Views: 3288

Hello, I have changed the SQL query to: SELECT evt.EVENTO FROM EVENTO evt WHERE strftime("%Y-%m-%d %H:%M:%f",evt.DATAHORA,'localtime') = strftime("%Y-%m-%d %H:%M:%f", :dthr ,'localtime') AND evt.UNIDADE = :unid and evt.TIPO_EVENTO = :tpevt Now I am binding the "dthr" pa...
by jjeffman
03.07.2013, 19:40
Forum: 6.6 - stable
Topic: TZConnection is always in transaction state
Replies: 15
Views: 12003

TZConnection is always in transaction state

Hello, I am using TZConnection to connect to a SQLIte database using sqlite-3 protocol. The value of TZConnection::InTransaction property is always set to true, even just after opening the connection without performing any database command. Is this a SQLite issue ? AutoCommit=false and TransactIsola...
by jjeffman
03.07.2013, 13:16
Forum: 6.6 - stable
Topic: SQLite timestamp problem
Replies: 5
Views: 3288

I am still using the locate method, which works fine. I have found a clue of the problem. I have defined the field "DATAHORA"as timestamp, and there is not this kind of data type on SQLite. I need to store timestamp values, so I have changed the column type to DATETIME. It might be solved....
by jjeffman
12.06.2013, 21:13
Forum: 6.6 - stable
Topic: SQLite timestamp problem
Replies: 5
Views: 3288

I have made some changes

Thank you for answering. I will give it a try. I have made some changes which are giving me the proper result. I have eliminated the date comparison, so I have got more than one row. The Locate method works fine passing the value to search for as DateTime. I am afraid it is not a SQLite problem beca...
by jjeffman
11.06.2013, 22:03
Forum: 6.6 - stable
Topic: SQLite timestamp problem
Replies: 5
Views: 3288

SQLite timestamp problem

Hello, I am a little bit new at SQLite. I have created a SQLite table as follows: Create table IF NOT EXISTS EVENTO ( EVENTO INTEGER NOT NULL PRIMARY KEY , DATAHORA Timestamp(3,3) NOT NULL , MODULO INTEGER, UNIDADE INTEGER NOT NULL, TIPO_EVENTO INTEGER NOT NULL, ) ; I have inserted a record with the...
by jjeffman
21.05.2013, 22:10
Forum: 6.6 - stable
Topic: Which script block has the error
Replies: 1
Views: 1469

Never mind. I have got it by myself.

Thank you very much.