Grazza Posted December 9, 2013 Posted December 9, 2013 Hi all, I'm new to VB.Net coming from VB6 I need to create an SQL database and it's tables from with in VB.Net Does anybody have any code for this. Regards Graham
jinnantonnixx Posted December 9, 2013 Posted December 9, 2013 (edited) I used Linq to SQL for a couple of projects a while back. It doesn't seem a popular method, though, but I quite liked the way it worked as it blended SQL with native code. Introduction to LINQ http://msdn.microsoft.com/en-us/library/bb385100%28v=vs.100%29.aspx ADO is the more usual way. How Do I Use the Connection Object in ADO? Edited December 9, 2013 by jinnantonnixx
Grazza Posted December 13, 2013 Author Posted December 13, 2013 Thanks for that, I've had a a little read up about Linq and I'm going to get a few books on the subject. I've ordered a few books on ADO.Net and VB.Net 2010 (5 in total) only cost me £15! Used books of course, but when you can get a £50 Book for 1p + p&p off Amazon, well you can't go wrong can you! Thanks again Graham
localzuk Posted December 13, 2013 Posted December 13, 2013 Linq is about a bazillion times easier and quicker to use than ADO in my experience. I switched my cashless catering system from ADO to Linq a couple of years ago. It knocked a huge chunk of code off my project size too. Definitely something to look at.
jinnantonnixx Posted December 13, 2013 Posted December 13, 2013 Useful cheet sheets http://download.damieng.com/dotnet/LINQToSQLCheatSheet.pdf (VB on page 2) LINQ Cheat Sheet - BradVin's .Net Blog Linq samples 101 LINQ Samples in C# http://aspnetresources.com/downloads/linq_standard_query_operators.pdf
jinnantonnixx Posted December 13, 2013 Posted December 13, 2013 If you've used the object builder in Visual Studio (i.e. dragged in a DB from SQL Explorer), and the DB changes structure (*cough*) you'll have to edit the table definitions in the auto-generated code. That's the only catch I've found.
localzuk Posted December 13, 2013 Posted December 13, 2013 Indeed. But that can be done using drag and drop pretty quickly so it doesn't take much effort in my experience.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now