On Tue, 2009-01-13 at 10:37 +, Martin Friebe wrote:
> >
> If you (the original poster) uses Mysql 5 or up, then "Show tables" is
> not needed. Use the information-schema instead
>
> SELECT table_name FROM INFORMATION_SCHEMA.TABLES WHERE table_schema =
> '/|db_name|/'
>
Yes, I tried t
On Tue, 2009-01-13 at 10:37 +, Martin Friebe wrote:
> Joost van der Sluis wrote:
> > Op maandag 12-01-2009 om 13:30 uur [tijdzone -0500], schreef David B
> > Copeland:
> >
> >
> >> "Query: Cannot open a non-select statement"
> >>
> >
> > 'show tables' is not a valid sql-statement. It
Joost van der Sluis wrote:
Op maandag 12-01-2009 om 13:30 uur [tijdzone -0500], schreef David B
Copeland:
"Query: Cannot open a non-select statement"
'show tables' is not a valid sql-statement. It is a MySQL-hack. The
TODBCConnection can not see that it is connected to a MySQL server
Op maandag 12-01-2009 om 13:30 uur [tijdzone -0500], schreef David B
Copeland:
> "Query: Cannot open a non-select statement"
'show tables' is not a valid sql-statement. It is a MySQL-hack. The
TODBCConnection can not see that it is connected to a MySQL server and
thus doesn't recognise this state
Ah yes, you are correct. However the the Open returns the following
error:
"Query: Cannot open a non-select statement"
I also have found some more help in the Lazarus wiki which just happens
to have an example of how to do a "show tables". So then, I tried the
following:
FormMyDB.Query.SQL.Cle
I think "execsql" never returns any records, you supposed to use "open"
for queries returning results.
Execsql is for insert, delete, update, etc.
David B Copeland wrote:
Hi,
I am trying to pre-fill a TComboBox with the all the tables in a
database, without sucess. I am running Suse 10.3, a
Hi,
I am trying to pre-fill a TComboBox with the all the tables in a
database, without sucess. I am running Suse 10.3, a recent (within a
week) Lazarus 0.9.27 from svn, FPC 2.2.2, 64-bit. The program uses a
ODBCConnection to a MySQL database.
The code I tried is:
FormMyDB.Query.SQL.Clear;
Fo