Databases: Using COM ADO to connect to Microsoft SQL

Databases: Using COM ADO to connect to Microsoft SQL

από Alexander Law -
Αριθμός απαντήσεων: 4
Hello,
While trying to deploy moodle in my infrastructure (Windows+IIS+MS SQL) I found no easy way to setup UTF-8 support for SQL database. I think that in this configuration it would be better to use COM ADO, than to install ODBTP or something else, and i found that moodle have corresponding driver included. Unfortunately, I couldnt use it out of box (it's not supported on higher levels).
I tried to make necessary changes to make it work, and after successful installation of DB I stuck and posted question here: http://moodle.org/mod/forum/discuss.php?d=100488.
Later, I found what was the problem - it's related to SQL bigint type, and I fixed it too. Now moodle is working and I have human-readable nvarchar/ntext values in my DB, exactly what I wanted.
So now I can present or post my changes, if it could be useful for anyone.

Best Regards,
Alexander



Μέσος όρος βαθμολογίας: -
Σε απάντηση σε Alexander Law

Re: Databases: Using COM ADO to connect to Microsoft SQL

από Luis de Vasconcelos -
Φωτογραφία Particularly helpful Moodlers

Alexander,

My response is a bit late (I only saw your post now)... but your work sounds very interesting. Can you share the changes that you made to the Moodle code with us? I'm very interested in trying out what you've done.

Thanks.

Σε απάντηση σε Luis de Vasconcelos

Re: Databases: Using COM ADO to connect to Microsoft SQL

από Alexander Law -
Hello Luis,
Yes, I can share changes, but I see one issue. I applied these changes to version 1.9.1, that i've downloaded some time ago, and if you want to have latest version, you need to analyze PHP-code, compare it to version 1.9.1 and make corresponding corrections. I think it would be rather difficult if you're not familiar with PHP. So maybe you just should wait until main moodle release offer support for native SQL drivers with UTF-8. BTW, if you're not using non-ASCII characters, existing standard mssql, odbc_mssql drivers should suit...

Best regards,
Alexander
Σε απάντηση σε Alexander Law

Re: Databases: Using COM ADO to connect to Microsoft SQL

από Tim Hunt -
Φωτογραφία Core developers Φωτογραφία Documentation writers Φωτογραφία Particularly helpful Moodlers Φωτογραφία Peer reviewers Φωτογραφία Plugin developers
Do you know about the tools diff and patch? They can automatically work out what has changed in a text file, and make the same changes to another file. See Development:How_to_create_a_patch and Development:How_to_apply_a_patch.
Σε απάντηση σε Alexander Law

Re: Databases: Using COM ADO to connect to Microsoft SQL

από Luis de Vasconcelos -
Φωτογραφία Particularly helpful Moodlers

Thanks Alexander. I'm fine with running Moodle 1.9.1 - I will only apply your changes on a test box, not my production box! And I'm happy to dig into the PHP code a bit - no problem with that... So, can you show us the changes you made? Thanks.