Re: DataObject multi-connection MSSQL and MYSQL
| From: | Alan Knowles | Date: | Sun, 27 Mar 2005 01:20:14 +0000 |
| Subject: | Re: DataObject multi-connection MSSQL and MYSQL | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-18363@lists.php.net to get a copy of this message | ||
On Thu, 2005-03-24 at 11:43 +0000, PHPDiscuss - PHP Newsgroups and
mailing lists wrote:
> Hi,
>
> I'm trying to use 2 different databases (MSSQL and MYSQL) with DO.
>
> I configured my dataobject.ini file like this :
> ---------------------------------------------------
> [DB_DataObject]
> database_quickvisionweb_beta =
> mysql://***:***@localhost/quickvisionweb_beta ;dsn
> database_pcbx = mssql://***:***@localhost/pcbx ;dsn
> table_superV = pcbx ;i only want to map one table
> ---------------------------------------------------
I think you need to use the generator_include_regex = '/pcbx/'
>
> When I generate my classes with the createtables script, it's ok for MYSQL
> but I've got this error with MSSQL :
>
> ---------------------------------------------------
> db_dataobject_generator: 0: CREATING FOR pcbx
> [db_error: message="DB Error: unknown error" code=-1 mode=return
> level=notice prefix="" info="EXEC SP_COLUMNS[_HISTORIQUE_ALARME_SYSTEME]
> [nativecode=-20 - Impossible d'envoyer des données Unicode dans un
> classement uniquement Unicode ou des données ntext aux clients utilisant
> DB-Library (par exemple ISQL) ou ODBC version 3.7 ou antérieure.]"]
> ---------------------------------------------------
>
There's an error message in french.. - (dont you just love localized
error messages.. ;).. I'm guessing using ODBC, it may not be able to
guess the column type.
Regards
Alan
> 1-Perhaps a problem for detecting some MSSQL types (i've got some GUID in
> this table). Do you have a solution for this ?
>
> 2-The other problem is that the generator wants to map all the tables of
> my MSSQL database but I only want to get one table definition (look at my
> dataobject.ini with table_superV = pcbx)
>
> Do you have some ideas ?
>
> Thx for all,
>
> JP. Dumont