Re: Problems with CMP/MySQL

2001-10-11 Thread Marcus Ahnve

I've just (10 minutes ago) been through this. You need to set 
.

The MySQL online documentation says that "bit" and "bool" gets converted 
to char(1), but in reality they where set to tinyint(1), which Orion for 
some reason could not use. The above solution worked for me.

Regards /Marcus

Roozbeh Ghaffari wrote:
> Dear Michael,
> 
> I have set the schema attribute of my datasource to 
> mysql.xml (which I have written myself). In this
> file I can only set datatype mappings. I can't tell
> Orion what are the literals for True or False.
> 
> tnx,
> Roozbeh/
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]] On Behalf Of Michael
> Simons
> Sent: Monday, October 01, 2001 11:14 AM
> To: Orion-Interest
> Subject: Re: Problems with CMP/MySQL
> 
> 
> Roozbeh Ghaffari wrote:
> 
> 
>>Hi All,
>>
>> 
>>
>>We use Orion CMP features with MySQL. We had problems with boolean and
>>char fields.
>>
>>I used P6Spy (www.provision6.com <http://www.provision6.com>)  to see
>>SQL commands generated by Orion.
>>
>>Orion says:
>>
>>update table_name set boolean_field = 'true'
>>
>>but MySQL expects
>>
>>update table_name set boolean_field = '1'
>>
>> 
>>
>>How can I ask Orion to generate the expected SQL?
>>
>> 
>>
>>But in case of character field we have a bigger problem.
>>
>>I try to set a character field to 'F' or 'M'
>>
>>Orion says:
>>
>>update table_name set char_field = 0
>>
>>!!!
>>
>>I don't understand what is happening!
>>
>> 
>>
>>Thank you in advance,
>>
>>Roozbeh/
>>
>>
> 
> Sounds like You're missing $ORION_HOME/config/database-schemas/mysql.xml
> 
> michael
> 
> 


-- 
Marcus Ahnve  email: [EMAIL PROTECTED]
Lecando AB   Office: +46-(0)8-634 94 18
Sweden   Mobile: +46-(0)70-462 19 18
www.lecando.comICQ#: 4564879






RE: Problems with CMP/MySQL

2001-10-02 Thread Roozbeh Ghaffari

Dear Michael,

I have set the schema attribute of my datasource to 
mysql.xml (which I have written myself). In this
file I can only set datatype mappings. I can't tell
Orion what are the literals for True or False.

tnx,
Roozbeh/

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Michael
Simons
Sent: Monday, October 01, 2001 11:14 AM
To: Orion-Interest
Subject: Re: Problems with CMP/MySQL


Roozbeh Ghaffari wrote:

> Hi All,
> 
>  
> 
> We use Orion CMP features with MySQL. We had problems with boolean and
> char fields.
> 
> I used P6Spy (www.provision6.com <http://www.provision6.com>)  to see
> SQL commands generated by Orion.
> 
> Orion says:
> 
> update table_name set boolean_field = 'true'
> 
> but MySQL expects
> 
> update table_name set boolean_field = '1'
> 
>  
> 
> How can I ask Orion to generate the expected SQL?
> 
>  
> 
> But in case of character field we have a bigger problem.
> 
> I try to set a character field to 'F' or 'M'
> 
> Orion says:
> 
> update table_name set char_field = 0
> 
> !!!
> 
> I don't understand what is happening!
> 
>  
> 
> Thank you in advance,
> 
> Roozbeh/
> 

Sounds like You're missing $ORION_HOME/config/database-schemas/mysql.xml

michael

-- 
Dipl.-Math. (fh) Michael Simons
UNIOPT AG // unique logistic optimization
Maximilianstr. 29; D-93047 Regensburg
phone: ++49(0)941/59578-0
http://www.uniopt.net/


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com





Re: Problems with CMP/MySQL

2001-10-01 Thread Michael Simons

Roozbeh Ghaffari wrote:

> Hi All,
> 
>  
> 
> We use Orion CMP features with MySQL. We had problems with boolean and 
> char fields.
> 
> I used P6Spy (www.provision6.com )  to see 
> SQL commands generated by Orion.
> 
> Orion says:
> 
> update table_name set boolean_field = 'true'
> 
> but MySQL expects
> 
> update table_name set boolean_field = '1'
> 
>  
> 
> How can I ask Orion to generate the expected SQL?
> 
>  
> 
> But in case of character field we have a bigger problem.
> 
> I try to set a character field to 'F' or 'M'
> 
> Orion says:
> 
> update table_name set char_field = 0
> 
> !!!
> 
> I don't understand what is happening!
> 
>  
> 
> Thank you in advance,
> 
> Roozbeh/
> 

Sounds like You're missing
$ORION_HOME/config/database-schemas/mysql.xml

michael

-- 
Dipl.-Math. (fh) Michael Simons
UNIOPT AG // unique logistic optimization
Maximilianstr. 29; D-93047 Regensburg
phone: ++49(0)941/59578-0
http://www.uniopt.net/





RE: Problems with CMP/MySQL

2001-09-30 Thread Troy Wong

I had a similar problem but found a fix for it. I assume you are using mm.mysql as 
your jdbc driver:

create table Article (
articleId varchar(100) not null primary key,
churchId varchar(100),
userId varchar(100),
title varchar(100),
content longtext,
createDate datetime,
expirationDate datetime,
expirable enum('t', 'f')
);

I had to modify my table to use enum('t', 'f') instead of bit or tinyint as a boolean 
type, and then it works.

- Brian
-Original Message-
From: Roozbeh Ghaffari <[EMAIL PROTECTED]>
To: Orion-Interest <[EMAIL PROTECTED]>
Subject: Problems with CMP/MySQL
Date: Sun Sep 30 08:38:18 GMT 2001

Hi All,
 
We use Orion CMP features with MySQL. We had problems with boolean and
char fields.
I used P6Spy (www.provision6.com)  to see SQL commands generated by
Orion. 
Orion says:
update table_name set boolean_field = 'true'
but MySQL expects
update table_name set boolean_field = '1'
 
How can I ask Orion to generate the expected SQL?
 
But in case of character field we have a bigger problem.
I try to set a character field to 'F' or 'M'
Orion says:
update table_name set char_field = 0
!!!
I don't understand what is happening!
 
Thank you in advance,
Roozbeh/