Search found 12 matches

by PhillHS
01.03.2010, 15:48
Forum: 6.6 - stable
Topic: quote characters in queries
Replies: 1
Views: 268

Ok,

I've done some more investigation it turns out that setting the .asstring is quoting correctly, my errors where being caused by an un-quoted quote in a select statement.

So I've added a call to EncodeCString() around the passed in string.

Cheers.

Phill.
by PhillHS
01.03.2010, 14:58
Forum: 6.6 - stable
Topic: quote characters in queries
Replies: 1
Views: 268

quote characters in queries

Hi, In my app I have found that if I have a TDBEdit, that is linked to a field in a mysql table (via a TZQuery, and TZconnection). If I type a string with a single quote in it such as "test'test" the field is correctly posted to the database (and the quote is escaped on the way, checked wi...
by PhillHS
16.11.2009, 15:42
Forum: MySQL
Topic: Problems updating Blob field
Replies: 2
Views: 749

Ok, I have got it working using the second version, the exception was being caused by my logging code which was being called from an TZSQLMonitor.

Cheers.

Phill.
by PhillHS
16.11.2009, 15:13
Forum: MySQL
Topic: Problems updating Blob field
Replies: 2
Views: 749

Trying another way of doing the update : PROCEDURE TChemDataModule.SaveDatasheet(InChemicalIDNo : Cardinal; Datasheet : TStream; FileName : STRING); VAR Blob : TStream; BEGIN; WITH ZDatasheetQuery DO BEGIN; Active:=FALSE; SQL.Text:=Format('replace into %s values(:%s,:%s,:%s)', [DbTableChemDatasheet....
by PhillHS
16.11.2009, 13:20
Forum: MySQL
Topic: Problems updating Blob field
Replies: 2
Views: 749

Problems updating Blob field

Hi, I'm trying to update a Blob field in one of my tables from a small word doc file that is stored in a TStream. I'm using Delphi 7, Zeos 6.6.5, and MySQL 5.0.x My update code is as follows : PROCEDURE TChemDataModule.SaveDatasheet(InChemicalIDNo : Cardinal; Datasheet : TStream; FileName : STRING);...
by PhillHS
01.11.2009, 06:20
Forum: SQLite
Topic: Strange edit behavior
Replies: 1
Views: 453

Strange edit behavior

Ok, so I'm trying to write a simple game launcher and using sqllite as the backend. I have a form where I can edit the game configurations that has the following components all linked to the same DataSource, which is liked to a ZQuery and then to a ZConnection to the database. The components I have ...
by PhillHS
02.03.2009, 18:24
Forum: MySQL
Topic: Retrieving enum types as string
Replies: 1
Views: 439

Retrieving enum types as string

Hi, Using Delphi 7, Zeos 6.6.0. I have a database table in MySQL 5.0.26 (linux) that has the following fields defined : iselectrical enum('Y','N') Interest enum('Y','N','U') When I try and uses FieldByName('iselectrical').AsString it always returns 'true' or 'false', whereas if i use FieldByName('In...
by PhillHS
03.10.2008, 17:25
Forum: MySQL
Topic: Retrieving column comments
Replies: 2
Views: 432

mdaems wrote:select column_comment from information_schema.columns where ...;
Cheers that seems to do what I need :)

Phill.
by PhillHS
01.10.2008, 10:06
Forum: MySQL
Topic: Retrieving column comments
Replies: 2
Views: 432

Retrieving column comments

Is there a way of retrieving the column comments from a MySQL 5 database ?

Cheers.

Phill.
by PhillHS
04.06.2007, 11:57
Forum: 6.5.1 (alpha) - 6.6.x (beta)
Topic: Weird crash in 6.6.1 beta.
Replies: 5
Views: 1233

In the first posting you said "The code crashes when executing the Open statement." But now it's OK, after you put the cange code that I told? I have indeed put in your changes, but am not sure if this fixed it, cirtainly I was still getting the crash after the patches where applied, whic...
by PhillHS
30.05.2007, 16:34
Forum: 6.5.1 (alpha) - 6.6.x (beta)
Topic: Weird crash in 6.6.1 beta.
Replies: 5
Views: 1233

Tried that, which alas did not seem to work :( Further investigation has revealed that the open is infact working, however it was triggering the onclick event of a TDBCheck box, which was attempting to modify one of the other fields and failing. The things is the Database *SHOULD* be open in read/wr...
by PhillHS
23.05.2007, 14:19
Forum: 6.5.1 (alpha) - 6.6.x (beta)
Topic: Weird crash in 6.6.1 beta.
Replies: 5
Views: 1233

Weird crash in 6.6.1 beta.

Hi, Using Zeos 6.6.1beta under Delphi 7, my database is a MySQL 5.x on a SuSE Linux server. The problem is the following code crashes with a EDatabaseError : "ZEditQuery: dataset is not in edit or insert mode". This only happens about 50% of the time, the other 50% it seems to be fine. WIT...