Windows server: Using COM ADODB to connect to MSSQL

Windows server: Using COM ADODB to connect to MSSQL

de Alexander Law -
Número de respuestas: 2
Hello,
I tried installing moodle 1.9.1 using MSSQL (2000). I want to setup the system for non-English learners, so i need UTF-8 support. When I choose mssql_n in installation wizard I get error 4004 (Unicode data in a Unicode-only collation or ntext data cannot be sent to clients using DB-Library (such as ISQL) ...) - , then I tried to use odbc driver - as ODBC must support UNICODE, setup was successful, but when i looked at tables, I've seen there UTF-8 encoded strings (non human-readable), so I can't browse and query DB using any third-party utilities.
I believe, that using ADODB.Connection with CP_UTF8 should fix this issue, I found that there moodle contains lib\adodb\drivers\adodb-ado_mssql.inc.php driver, so it seems COM ADO layer is implemented. So the question is - are there any reasons why this driver not supported during moodle installation?

I tried to create config.php manually and specify there this driver, after that I added some small changes to code for support dbtype 'ado_mssql'. And after this changes was created successfully using /admin/index.php. But now I can't login to site, i think it's because site wasn't setup properly (as /install.php do).
But I can't execute /install.php, because I already have config.php (created manually). I can try to add 'ado_mssql' support to install.php too (to perform normal installation procedure), but it seems that it will require more global changes. So I want to understand does it make any sense at all or may be lack of the ado_mssql support has some rational.

Best Regards


Promedio de valoraciones: -
En respuesta a Alexander Law

Re: Windows server: Using COM ADODB to connect to MSSQL

de Richard Enison -
AL,

I'm no expert on MSSQL. All I know, based on what I've read in these forums and the Moodle docs is:
  1. Moodle does not support MS SQL Server 2000. It supports MS SQL Server 2005.
  2. If you try MS SQL Server 2005 and still get error 4004, see http://tracker.moodle.org/browse/MDL-14048 and http://docs.moodle.org/en/Installing_MSSQL_for_PHP#Troubleshooting
  3. If you want to run install.php again but can't because config.php is there, just delete, move, or rename config.php.
RLE
En respuesta a Richard Enison

Re: Windows server: Using COM ADODB to connect to MSSQL

de Alexander Law -
Hello, Richard
I see your point about SQL 2005, but this problem is not related to any specific version. I think it could be easily reproduced on 2005 too.
About error 4004 i did read that documentation, but I dont want to install one more service (included with ODBTP), i just want to use existing ADO API to access SQL DB.
And regarding 3-rd remark - As I figured out, my problem (inability to log in) wasn't related to installation procedure, in fact there was some issues with ADO SQL results. After I fixed that I can login and now I am trying to configure the system using that driver...

Alexander