This topic is locked

Changing database types

9/16/2007 9:26:04 PM
PHPRunner General questions
S
stoneiii author

What is the best way to change a project database from MYSQL to MSSQL? I would like to change the database without having to completely recreate the project from scratch. Thanks for any suggestions.

Alexey admin 9/17/2007

Hi,
At first create a new MSSQL-based project and save it.

Open .phpr file with a text editor and find a line that starts with:

<m_strConnectionString>...

Copy it to clipboard.
Open .phpr file of a project you need to convert with a text editor.

Replace <strConnectionString> line with clipboard contents.
Replace this line:

<m_nDatabaseType>0</m_nDatabaseType>



with the following:

<m_nDatabaseType>2</m_nDatabaseType>

Change this snippet:

<m_cLeftWrap>`</m_cLeftWrap>

<m_cRightWrap>`</m_cRightWrap>

to this:

<m_cLeftWrap>[</m_cLeftWrap>

<m_cRightWrap>]</m_cRightWrap>


Then find all occurencies of `(backquote) character and replace it with [or ]

I.e. change

select `Field1`,`Field2` ...

to

select [Field1],[Field2] ...