Home > Archive > PHP Pear > March 2005 > DataObject multi-connection MSSQL and MYSQL
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
DataObject multi-connection MSSQL and MYSQL
|
|
| PHPDiscuss - PHP Newsgroups and mailing lists 2005-03-24, 8:57 am |
| 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
---------------------------------------------------
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.]"]
---------------------------------------------------
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
| |
| Alan Knowles 2005-03-27, 3:58 am |
| On Thu, 2005-03-24 at 11:43 +0000, PHPDiscuss - PHP Newsgroups and
mailing lists wrote:
> Hi,
>=20
> I'm trying to use 2 different databases (MSSQL and MYSQL) with DO.
>=20
> I configured my dataobject.ini file like this :=20
> ---------------------------------------------------
> [DB_DataObject]
> database_quickvisionweb_beta =3D=20
> mysql://***:***@localhost/quickvisionweb_beta ;dsn
> database_pcbx =3D mssql://***:***@localhost/pcbx ;dsn=09
> table_superV =3D pcbx ;i only want to map one table
> ---------------------------------------------------
I think you need to use the generator_include_regex =3D '/pcbx/'
>=20
> When I generate my classes with the createtables script, it's ok for MYSQ=
L
> but I've got this error with MSSQL :
>=20
> ---------------------------------------------------
> db_dataobject_generator: 0: CREATING FOR pcbx=20
> [db_error: message=3D"DB Error: unknown error" code=3D-1 mode=3Dreturn
> level=3Dnotice prefix=3D"" info=3D"EXEC SP_COLUMNS[_HISTORIQUE_ALARME_SYS=
TEME]
> [nativecode=3D-20 - Impossible d'envoyer des donn=E9es Unicode dans un
> classement uniquement Unicode ou des donn=E9es ntext aux clients utilisan=
t
> DB-Library (par exemple ISQL) ou ODBC version 3.7 ou ant=E9rieure.]"]
> ---------------------------------------------------
>=20
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 ?
>=20
> 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 =3D pcbx)
>=20
> Do you have some ideas ?
>=20
> Thx for all,
>=20
> JP. Dumont
|
|
|
|
|