MySql and MSSql

Topic Specific Tutorials and Tips.

Moderator: Rathinagiri

User avatar
salamandra
Posts: 311
Joined: Thu Jul 31, 2008 8:33 pm
DBs Used: DBF, MySQL, SQL
Location: Brazil

MySql and MSSql

Post by salamandra »

Hi to all ;)
I have some apps working fine with MySql, but now some of my customers
will change (in the next 90 days) the old file servers with MySql for new file servers with
MSSql (preinstalled at factory).
Since I have neither customers nor I even working computers with MSSql,
My question is: It is MySql library 100% compatible with MSSql?

Case NOT, any recommendation or Suggestion?

TIA,

[]´s Salamandra
There is one time in which is crucial awakening. That time is now. ( Buddha )
User avatar
dhaine_adp
Posts: 457
Joined: Wed Aug 06, 2008 12:22 pm
Location: Manila, Philippines

Re: MySql and MSSql

Post by dhaine_adp »

Hi,

Looks like it is a complicated task my friend. Please direct your query to Harbour I believed they can respond appropriately. On the otherhand if you have an MS SQL do an early testing from backup copy of the database or table (if possible). In this way you can better gauge the compatibility and the problem that may arise. An on another plus side you could always bill your customer for your professional services..... Good luck!


Danny
Regards,

Danny
Manila, Philippines
User avatar
sudip
Posts: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: MySql and MSSql

Post by sudip »

Can it be done with ODBC? Please correct me if I am wrong :)
With best regards,
Sudip
User avatar
apais
Posts: 440
Joined: Fri Aug 01, 2008 6:03 pm
DBs Used: DBF
Location: uruguay
Contact:

Re: MySql and MSSql

Post by apais »

MSSQL introduces non standard sql command extentions in their dialect.
It can be accessed tru odbc without problems.
Database Management and tunning is way more complicated, but this is server's admins problem.
As all in MS world they want you to use THEIR servers, THEIR databases and THEIR dev tools.
So you will be probably be pushed to develop in c# at the end.

21st century MS is like 80's IBM.
Once you get into their world you are not are allowed to get out.

HTH
Angel
Angel Pais
Web Apps consultant/architect/developer.
HW_apache (webserver modules) co-developer.
HbTron (Html GUI for harbour desktop hybrid apps) co-developer.
https://www.hbtron.com
User avatar
salamandra
Posts: 311
Joined: Thu Jul 31, 2008 8:33 pm
DBs Used: DBF, MySQL, SQL
Location: Brazil

Re: MySql and MSSql

Post by salamandra »

Hi to all :)
Yes... it seems to be a complicated situation, because i have dozens
of apps accessing MYSQL.
Anybody has a working sample about how to access MSSQL through ODBC ??
That´s not what i would like to do because rewrite all these apps means : Too Much Work,
Too Much Time and can become a nightmare for me :cry:

TIA,

[]´s Salamandra

======================================================================
// SPANISH

Hola a todos :)
Si... realmente parece que estoy en una situacion complicada porque tengo
dozenas de aplicaciones que conectan a MYSQL.
Alguno de ustedes tiene algun ejemplo que funcione bien
para conectar a MSSQL usando ODBC ??
Realmente no es lo que me gustaria hacer, porque reescribir todas esas
aplicaciones de vuelta me daria mucho trabajo, me tomaria mucho tiempo
y puede transformarse en una pesadilla para mi. :cry:

Gracias a todos,

[]´s Salamandra
There is one time in which is crucial awakening. That time is now. ( Buddha )
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: MySql and MSSql

Post by Rathinagiri »

We should not re-write the whole code, at least for this.

We should have a middle-tier UDF for connecting any SQL based server.

For example, I have used some User defined functions like, sqlconnect(), sql(), miscsql() etc. I use only these functions to access the SQL in my programs. I have created these functions for each SQL based connections like MySQL, SQLite etc. Therefore, I need not change my full code if I change the method of accessing SQL.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
apais
Posts: 440
Joined: Fri Aug 01, 2008 6:03 pm
DBs Used: DBF
Location: uruguay
Contact:

Re: MySql and MSSql

Post by apais »

Beleive me ! MSSQL is a totally different beast.
They don't publish a direct access api. You musto go tru odbc, ado or MS technologies.
They are allways thinking ways to lock you in !.
LINQ, and other recent buzzwords are MS intents to reinvent the wheel and force you to use C# or VB.NET
Angel Pais
Web Apps consultant/architect/developer.
HW_apache (webserver modules) co-developer.
HbTron (Html GUI for harbour desktop hybrid apps) co-developer.
https://www.hbtron.com
User avatar
salamandra
Posts: 311
Joined: Thu Jul 31, 2008 8:33 pm
DBs Used: DBF, MySQL, SQL
Location: Brazil

Re: MySql and MSSql

Post by salamandra »

Hi Rathi ;)
Can you post a working sample of those UDF´s ??
I think this can help me very much :mrgreen:

TIA,

[]´s Salamandra
There is one time in which is crucial awakening. That time is now. ( Buddha )
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: MySql and MSSql

Post by Rathinagiri »

With pleasure.

In this zip file, you have two files, one for SQLite connectivity UDF and another for MySQL connectivity. I will include the required file asper the connection requirement and needn't change the entire code.
sqludf.zip
(1.92 KiB) Downloaded 504 times
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
salamandra
Posts: 311
Joined: Thu Jul 31, 2008 8:33 pm
DBs Used: DBF, MySQL, SQL
Location: Brazil

Re: MySql and MSSql

Post by salamandra »

Hi rathi ;)
At first, excuse me. I took a long time to answer your post because i´been sick.
(I'm still recovering from a heart surgery)
Well, thanks for this nice piece of code, it´s a very nice job and
will be very useful for me.
But... I think I had not explained properly this question about my app´s and MSSQL.
Let me try to explain:
I have almost 100 diferent apps (business apps) runing in several clients, working fine
with MySql.
Now, some of this clients will replace the old file servers with new file servers
(bought from DELL Computers), and ALL of these NEW SERVERS come with
MSSQL preinstalled at factory and I CAN NOT install MySql again.
Then, I need to find any way to make my software to work fine (or almost) with MSSQL.
Some days ago, Angel had suggested that it would be possible access MSSQL via ODBC,
and I did not undestand how-to exactly.
As far as I know you can really access MSSQL via ODBC configuring MSSQL as a
new data source, but I am really searching for a "programmatic way" to connect
to and SELECT, INSERT, DROP, UPDATE & etc to a MSSQL database.
Any ideia about how-to ??
I'll be very grateful for the suggestions


T.I.A.,


[]´s Salamandra
There is one time in which is crucial awakening. That time is now. ( Buddha )
Post Reply