Re: dumb question?

2011-07-06 Thread XL Cordemans
Goede morgen, 

and thank you for your suggestion.
I am actually wondering if the difference between lasso 8.1 and 8.6 is so big 
that traditional lasso code can not be used when connecting w/ MySQL ?

You mentioned "... This can be done in the server configuration, so no 
alterations are necessary ...". Do you mean one of the mode that came with 
lasso (Server, site)

to resume may I ask you to confirm: the simple code [inline:-add, 
-database=..., -table=..., field=value] can not be used anymore w/ MySQL, or 
can it?

Alvast Bedankt




--- On Wed, 7/6/11, Rik Wasmus  wrote:

> From: Rik Wasmus 
> Subject: Re: dumb question?
> To: mysql@lists.mysql.com
> Date: Wednesday, July 6, 2011, 10:27 PM
> On Wed, 2011-07-06 at 07:15 -0700, XL
> Cordemans wrote:
> > (error code) 1064
> > (error message) HY000 [Actual][MySQL] You have an
> error in your SQL syntax; check the manual that corresponds
> to your MySQL server version for the right syntax to use
> near '"DMPPRuser") VALUES ('MYNAME')' at line 1 
> 
> You'll need to enable ANSI_QUOTES to be able the use '"' as
> an
> identifier quote character rather then MySQL's default
> '`'.
> 
> See:
> http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html#sqlmode_ansi_quotes
> 
> This can be done in the server configuration, so no
> client/lasso
> alterations are necessary.
> -- 
> Rik
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=luna...@yahoo.com
> 
>

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



RE: dumb question?

2011-07-06 Thread Rik Wasmus
On Wed, 2011-07-06 at 11:03 -0400, Martin Gainty wrote:
> Rik and Crew

Please keep your replies to the list only, I don't need to double on
e-mail...

> String values are always ticked VALUES('MYNAME') unless ANSI_QUOTES are 
> enabled
> Column names are never surrounded by ticks or double quotes

They surely can, and in this case, are.

>  so
> TABLE table_name
> FOO VARCHAR(30)
> 
> where the INSERT statement for table table_name column FOO would look like:
> INSERT INTO table_name FOO VALUES('VALUES ARE ALWAYS SURROUNDED BY TICK MARKS 
> UNLESS ANSI_QUOTES ARE ENABLED');

May I quote:

> > > (error code) 1064
> > > > (error message) HY000 [Actual][MySQL] You have an error in your SQL 
> > > > syntax; check the manual that corresponds to your MySQL server version 
> > > > for the right syntax to use near '"DMPPRuser") VALUES ('MYNAME')' at 
> > > > line 1 

See the double quotes around the column name? Aye? 'nuff said.

> Bedankt,
> Martin

Graag gedaan,
-- 
Rik


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



RE: dumb question?

2011-07-06 Thread Martin Gainty

Rik and Crew
String values are always ticked VALUES('MYNAME') unless ANSI_QUOTES are enabled
Column names are never surrounded by ticks or double quotes so
TABLE table_name
FOO VARCHAR(30)

where the INSERT statement for table table_name column FOO would look like:
INSERT INTO table_name FOO VALUES('VALUES ARE ALWAYS SURROUNDED BY TICK MARKS 
UNLESS ANSI_QUOTES ARE ENABLED');

Bedankt,
Martin

> Subject: Re: dumb question?
> From: rik.was...@grib.nl
> To: mysql@lists.mysql.com
> Date: Wed, 6 Jul 2011 16:39:16 +0200
> 
> On Wed, 2011-07-06 at 16:27 +0200, Rik Wasmus wrote:
> > On Wed, 2011-07-06 at 07:15 -0700, XL Cordemans wrote:
> > > (error code) 1064
> > > (error message) HY000 [Actual][MySQL] You have an error in your SQL 
> > > syntax; check the manual that corresponds to your MySQL server version 
> > > for the right syntax to use near '"DMPPRuser") VALUES ('MYNAME')' at line 
> > > 1 
> > 
> > You'll need to enable ANSI_QUOTES to be able the use '"' as an
> > identifier quote character rather then MySQL's default '`'.
> > 
> > See:
> > http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html#sqlmode_ansi_quotes
> 
> Oh, and if possible, go for even more standards-compliant:
> http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html#sqlmode_ansi
> 
> -- 
> Rik
> 
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/mysql?unsub=mgai...@hotmail.com
> 
  

Re: dumb question?

2011-07-06 Thread Rik Wasmus
On Wed, 2011-07-06 at 16:27 +0200, Rik Wasmus wrote:
> On Wed, 2011-07-06 at 07:15 -0700, XL Cordemans wrote:
> > (error code) 1064
> > (error message) HY000 [Actual][MySQL] You have an error in your SQL syntax; 
> > check the manual that corresponds to your MySQL server version for the 
> > right syntax to use near '"DMPPRuser") VALUES ('MYNAME')' at line 1 
> 
> You'll need to enable ANSI_QUOTES to be able the use '"' as an
> identifier quote character rather then MySQL's default '`'.
> 
> See:
> http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html#sqlmode_ansi_quotes

Oh, and if possible, go for even more standards-compliant:
http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html#sqlmode_ansi

-- 
Rik



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: dumb question?

2011-07-06 Thread Rik Wasmus
On Wed, 2011-07-06 at 07:15 -0700, XL Cordemans wrote:
> (error code) 1064
> (error message) HY000 [Actual][MySQL] You have an error in your SQL syntax; 
> check the manual that corresponds to your MySQL server version for the right 
> syntax to use near '"DMPPRuser") VALUES ('MYNAME')' at line 1 

You'll need to enable ANSI_QUOTES to be able the use '"' as an
identifier quote character rather then MySQL's default '`'.

See:
http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html#sqlmode_ansi_quotes

This can be done in the server configuration, so no client/lasso
alterations are necessary.
-- 
Rik


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



dumb question?

2011-07-06 Thread XL Cordemans
Hi, 

I started with lasso 3.x  & FMP, jumped to lasso 8.5 with SQLlite (and loved 
it), now need to work with MySQL and Laso 8.6 (on Mac mini with Snow Leopard 
server 10.6.7 ). I am not a programmer but quite familiar with the traditional 
encoding when using  lasso. Now the question:

I created the DB on MySQL 5.0x that came with the server and can access it 
using ODBC and FMP for example ; no problems in creating records etc. BUT when 
using the traditional code of Lasso [inline][/inline] to simply add a single 
simple record it returned this:

(error code) 1064
(error message) HY000 [Actual][MySQL] You have an error in your SQL syntax; 
check the manual that corresponds to your MySQL server version for the right 
syntax to use near '"DMPPRuser") VALUES ('MYNAME')' at line 1 

The dead simple code I used is (mysql is on another machine):

[var:'Vuser'=(form_param:'somefield')]

[inline: 
-Host=(Array:-Datasource='odbc', -Name='whatever', -Username='xxx', 
-Password='yyy'),
-database='DBname', -table='DBtable', 'fieldname'=$Vuser, -add]


then I found this from Fletcher 
(http://lasso.2283332.n4.nabble.com/What-s-wrong-with-my-sql-INSERT-syntax-td3107790.html
 ) [OK, that was back in 2006]:

{ . Or, you can use a traditional inline to do the same thing.  Lasso 
handles the quoting and encoding for you. 

[inline: -database='...', -table='events', -add, 'e_date'=$e_date, 
'e_time'=$e_time, 'eventname'=$event_name, 'place'=$place, 'agenda'=$agenda, 
'contact'=$contact, 'email'=$email, 'phone'=$phone, 'calendar'=$calendar, 
'details'=$details] 
[/inline] 

}

Now I checked with another lasso user but running Lasso version 8.1.0 and he is 
using the same 'traditional' approach with no problems.  But I am using the 
mysql that came with Snow Leopard Server 10.6.7 with Lasso 8.6  , it looks like 
the MySQL is version 5.0x .

I need to keep it simple, and am looking for a plain traditional approach ...


Thanks





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org