Showing posts with label MsSQL. Show all posts
Showing posts with label MsSQL. Show all posts

Thursday, August 17, 2017

Connecting to MySQL Server from a Microsoft SQL Server

This seams to me that connecting MySQL and Microsoft SQL databases is something that should be simple to do. Unfortunately looking around online there was no real clear directions or even indications that this was possible without buying some additional drivers.  While fear not because this does work out of the box without needing to buy any additional software on pretty much any versions of the two databases.

In short what we will do is add a MySQL ODBC driver, configure a System DSN using that driver, Link MsSQL to that DSN connection, and to do a few test queries and updates.  This will allow full insert, update, and delete commands.

Monday, March 11, 2013

Using LINQ to SQL for clean and quick Database Access/Interactions.

Update: October 26, 2016 - I would now recomend using this replacement guide using the built in PetaPoco instead of this method as it is much cleaner and requires significantly less DBA code and produced much smaller binaries.  There are also T4 Templates that will generate models form your database so you can design in code and generate database constructs automatically, or create tables and then auto-generate code form those, whichever way you prefer.  I still use the Columns features below for when creating forms.

This post is a demonstration/instructions for very easily and cleanly working with SQL data in a .NET application using LINQ to SQL.  There are lots of resources out there about this technology but my goal here is to present a very clean and thin interface to utilizing LING to SQL.  Read on for explanations and samples.