RSS Forums RSS
Please support our MySQL advertiser: Programming Forums
Views: 2442 | Replies: 4
Reply
Join Date: Apr 2004
Posts: 555
Reputation: Dark_Omen is an unknown quantity at this point 
Rep Power: 6
Solved Threads: 5
Dark_Omen Dark_Omen is offline Offline
Posting Pro

new to mySQL

  #1  
Jul 19th, 2005
Hello everyone,

I am new to mySQL. I want to know how to use mySQL with c#, and if there is any difference between MS SQL and mySQL.
Also any links to tutorials would be great.

Thanks
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2005
Location: Kansas City, Missouri, USA
Posts: 345
Reputation: Troy is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 4
Troy's Avatar
Troy Troy is offline Offline
Posting Whiz

Re: new to mySQL

  #2  
Jul 22nd, 2005
I was hoping someone with more specific experience would reply, but so far no takers.

Well....I am very experienced with both MSSQL and MySQL. ANSI standard SQL is the same on all RDBMS. However, most database systems have their own extension functions. For example, a common T-SQL (Microsoft's Transact-SQL) function I used a lot was ISNULL(). You won't have that in MySQL. MySQL has a handy MD5() function to encrypt a string. I don't think T-SQL has that function. There are a lot of functions like this that are different between the two, but the basics of writing queries is identical--that is all the rules regarding SELECT, FROM, INNER, WHERE, GROUP BY, ORDER BY, etc.

Now if you are used to using Stored Procedures and User-Defined Functions in MSSQL, you won't have those in anything before MySQL 5--which is brand new and not supported by most hosts yet. (Most hosts are probably still using MySQL v3.2 or so.)

All in all, I found it very easy to make the transition from a code perspective.

As for using MySQL in C#, I can't speak directly to that, but it should be the same as using any other database. You can create a DSN on your system and then use the ODBC class libraries in the .NET Framework.

Enjoy the journey.
Troy Wolf is the author of SnippetEdit. "Website editing as easy as it gets." IX Web Hosting
Reply With Quote  
Join Date: Apr 2004
Posts: 555
Reputation: Dark_Omen is an unknown quantity at this point 
Rep Power: 6
Solved Threads: 5
Dark_Omen Dark_Omen is offline Offline
Posting Pro

Re: new to mySQL

  #3  
Jul 23rd, 2005
Thanks for the advice. How can you start a database with mySQL (that is also what I am having trouble with), and how do you get the DSN and other connection information from mySQL. Thanks
Reply With Quote  
Join Date: Jun 2005
Location: Kansas City, Missouri, USA
Posts: 345
Reputation: Troy is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 4
Troy's Avatar
Troy Troy is offline Offline
Posting Whiz

Re: new to mySQL

  #4  
Jul 23rd, 2005
Well, to get started with MySQL, I recommend you go check out my WAMP HOWTO at http://www.troywolf.com/articles. You can just skip to the MySQL part if that is all you need.

I'm making the assumption you are working with Windows since you are talking about C#. I'm not a C# programmer, but I took a 5-day C# class. I really like the language. If you know C#, you'll find PHP easy to work with--if you ever decide to take that road.

As far as creating a DSN, I know I mentioned that in my previous post, but honestly, I've never setup a DSN for MySQL. Also, I've never used ODBC with MySQL--although I'm sure it works just dandy. I've always used PHP's native functions for MySQL. My HOWTO talks you through installing the MySQL "Essential" installation. Maybe you should instead go for the full package install. I think it comes with ODBC drivers for Windows as well as a GUI tool for database admin. I really wish somebody else on the forum here who knows exactly about this would help you. With 44,000+ members, I'm sure ONE of them uses MySQL with ODBC on Windows.

When you get it all working, come back here with a follow-up post. Thanks!
Troy Wolf is the author of SnippetEdit. "Website editing as easy as it gets." IX Web Hosting
Reply With Quote  
Join Date: Apr 2004
Posts: 555
Reputation: Dark_Omen is an unknown quantity at this point 
Rep Power: 6
Solved Threads: 5
Dark_Omen Dark_Omen is offline Offline
Posting Pro

Re: new to mySQL

  #5  
Jul 25th, 2005
Thanks for the help Troy, you actually got me curious about PHP too.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 11:50 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC