Re: [Gambas-user] SQL query for DB.Exec() question

2013-08-30 Thread Willy Raets
On Thu, 2013-08-29 at 11:39 +0930, Bruce wrote: > On Thu, 2013-08-29 at 01:56 +0200, Willy Raets wrote: > > On Thu, 2013-08-29 at 09:17 +0930, Bruce wrote: > > > On Thu, 2013-08-29 at 01:25 +0200, Willy Raets wrote: > > > > On Wed, 2013-08-28 at 22:28 +0200, Tobias Boege wrote: > > > > > On Wed, 28

Re: [Gambas-user] SQL query for DB.Exec() question

2013-08-29 Thread Benoît Minisini
Le 28/08/2013 22:18, Willy Raets a écrit : > Hello all, > > I've been searching the Gambas mailing list archives and documentation > for a answer to a problem I have. Tried all kinds of suggestions but > haven't solved the problem yet. > > ... > > I have tried it like this in Gambas (rData being a

Re: [Gambas-user] SQL query for DB.Exec() question

2013-08-29 Thread Caveat
t; > myString.= "WHERE IC.ProductID = Product.ProductID " > myString.= "ORDER BY IC.ID DESC" > rData = ConMyData.Exec(myString) > > > This is not correct: > rData = ConMyData.Exec("SELECT &1 FROM IC", "'Actueel IC'") > > S

Re: [Gambas-user] SQL query for DB.Exec() question

2013-08-29 Thread nando
FROM IC", "'Actueel IC'") Should be: rData = ConMyData.Exec("SELECT `Actual IC` FROM IC") Again, PLEASE don't use spaces embedded in the field. -- Original Message ------- From: Willy Raets To: mailing list for gambas users Sent: Wed, 28 Aug

Re: [Gambas-user] SQL query for DB.Exec() question

2013-08-29 Thread Jorge Carrión
Hi willy. ConMyData.Exec("SELECT &1 FROM IC", "'Actueel IC'") is right... jus remove the white space between & and 1. Regards. 2013/8/28 Willy Raets > Hello all, > > I've been searching the Gambas mailing list archives and documentation > for a answer to a problem I have. Tried all kinds of

Re: [Gambas-user] SQL query for DB.Exec() question

2013-08-28 Thread Bruce
On Thu, 2013-08-29 at 01:56 +0200, Willy Raets wrote: > On Thu, 2013-08-29 at 09:17 +0930, Bruce wrote: > > On Thu, 2013-08-29 at 01:25 +0200, Willy Raets wrote: > > > On Wed, 2013-08-28 at 22:28 +0200, Tobias Boege wrote: > > > > On Wed, 28 Aug 2013, Willy Raets wrote: > > > > > Hello all, > > > >

Re: [Gambas-user] SQL query for DB.Exec() question

2013-08-28 Thread Randall Morgan
Can you give us a dump of the table structure of all tables involved in the query, perhaps from something like phpmyadmin or a similar tool? On Wed, Aug 28, 2013 at 4:56 PM, Willy Raets wrote: > On Thu, 2013-08-29 at 09:17 +0930, Bruce wrote: > > On Thu, 2013-08-29 at 01:25 +0200, Willy Raets wr

Re: [Gambas-user] SQL query for DB.Exec() question

2013-08-28 Thread Willy Raets
On Thu, 2013-08-29 at 09:17 +0930, Bruce wrote: > On Thu, 2013-08-29 at 01:25 +0200, Willy Raets wrote: > > On Wed, 2013-08-28 at 22:28 +0200, Tobias Boege wrote: > > > On Wed, 28 Aug 2013, Willy Raets wrote: > > > > Hello all, > > > > > > > > I've been searching the Gambas mailing list archives a

Re: [Gambas-user] SQL query for DB.Exec() question

2013-08-28 Thread Bruce
On Thu, 2013-08-29 at 01:25 +0200, Willy Raets wrote: > On Wed, 2013-08-28 at 22:28 +0200, Tobias Boege wrote: > > On Wed, 28 Aug 2013, Willy Raets wrote: > > > Hello all, > > > > > > I've been searching the Gambas mailing list archives and documentation > > > for a answer to a problem I have. Tri

Re: [Gambas-user] SQL query for DB.Exec() question

2013-08-28 Thread Willy Raets
On Wed, 2013-08-28 at 14:08 -0700, Randall Morgan wrote: > FYI > > > It is standard practice to never use spaces in MySQL table and field > names. Replace the spaces with underscores. Also, it's good to use > only lower case field names (especially if you access the database > remotely. So your f

Re: [Gambas-user] SQL query for DB.Exec() question

2013-08-28 Thread Willy Raets
On Wed, 2013-08-28 at 23:16 +0200, Charlie Reinl wrote: > On Wed, 28 Aug 2013 22:18:52 +0200, Willy Raets > > wrote: > > Hello all, > > > > I've been searching the Gambas mailing list archives and documentation > > for a answer to a problem I have. Tried all kinds of suggestions but > > haven't s

Re: [Gambas-user] SQL query for DB.Exec() question

2013-08-28 Thread Willy Raets
On Wed, 2013-08-28 at 22:28 +0200, Tobias Boege wrote: > On Wed, 28 Aug 2013, Willy Raets wrote: > > Hello all, > > > > I've been searching the Gambas mailing list archives and documentation > > for a answer to a problem I have. Tried all kinds of suggestions but > > haven't solved the problem yet

Re: [Gambas-user] SQL query for DB.Exec() question

2013-08-28 Thread Charlie Reinl
On Wed, 28 Aug 2013 22:18:52 +0200, Willy Raets wrote: > Hello all, > > I've been searching the Gambas mailing list archives and documentation > for a answer to a problem I have. Tried all kinds of suggestions but > haven't solved the problem yet. > > This is the situation simplified: > > A MyS

Re: [Gambas-user] SQL query for DB.Exec() question

2013-08-28 Thread Randall Morgan
FYI It is standard practice to never use spaces in MySQL table and field names. Replace the spaces with underscores. Also, it's good to use only lower case field names (especially if you access the database remotely. So your fields should be: product_id initial_ic actual_ic etc.. Using mixed ca

Re: [Gambas-user] SQL query for DB.Exec() question

2013-08-28 Thread Tobias Boege
On Wed, 28 Aug 2013, Willy Raets wrote: > Hello all, > > I've been searching the Gambas mailing list archives and documentation > for a answer to a problem I have. Tried all kinds of suggestions but > haven't solved the problem yet. > > This is the situation simplified: > > A MySql database name

[Gambas-user] SQL query for DB.Exec() question

2013-08-28 Thread Willy Raets
Hello all, I've been searching the Gambas mailing list archives and documentation for a answer to a problem I have. Tried all kinds of suggestions but haven't solved the problem yet. This is the situation simplified: A MySql database named MyData with a two tables named IC and Products. Both tab