Results 1 to 4 of 4

Thread: Change of database SQLExpress to MySql

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2010
    Posts
    387

    Change of database SQLExpress to MySql

    If I have written an application which uses SQLExpress and want to convert it to MySQL, is it a simple task of changing the connection string or would it involve a large rewrite of the code that refers to the database ?

  2. #2
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,066

    Re: Change of database SQLExpress to MySql

    Depends on which version of VB ... if VB6 then it might need some tweaking on the SQL iteself... if .NET then you'll need to swap out the SQLServer objects fro the MtSQLConnector ones... which should be a simple search/replace.


    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    3,565

    Re: Change of database SQLExpress to MySql

    What tg said.
    addionally you‘d have to change DBMS specific SQL-Stuff.
    the classic being „SELECT TOP(1)“ vs. „SELECT….. LIMIT 1“
    Last edited by Zvoni; Tomorrow at 31:69 PM.
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    One System to rule them all, One Code to find them,
    One IDE to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    Code is like a joke: If you have to explain it, it's bad

  4. #4
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    109,268

    Re: Change of database SQLExpress to MySql

    You can add the MySQL Connector/Net as a NuGet package and then change all the System.Data.SqlClient types to the corresponding MySql.Data.MySqlClient types.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width