How do you set up a simple local SQLite database in vb.NET? - vb.net

I'm doing a school project using Visual Studios 2010 Express and I'm coding in vb.NET. I have fair knowledge of the language but as soon as I tried to implement a SQLite database in my project, I was hit with complicated syntax I've never before seen. So, I searched online and couldn't find helpful tutorials on SQLite specifically for vb.NET. Nobody has made videos on YouTube for it and most websites just show code and expect people to know it. Since I'm doing a write-up as well, I need to understand each line of code inside out, so it would be nice if someone could give me an in-depth guide on how to set up a SQLite database on my vb.NET project.
PS: I've already installed the References like ADO.NET and System.Data.SQLite.dll
Thanks!

Related

Setting up a Database Diagram in VS2012 & SSDT?

I'm working myself through this book called Head First C#.NET as I want to get into programming.
Basically the book was written for VS2010, but since my employer has bought me a MSDN License, I decided to go for VS2012 instead.
One of the assignments in the book is to create a local database, and make a database diagram for it. Unfortunately, this functionality has been removed from VS itself from VS2012 and upwards.
I've already googled it, and read that this was replaced by SSDT. Hence, I installed SSDT but I'm still not able to view and/or create a Database Diagram.
Is the "Diagram" functionality completely deprecated from 2012 and should I be looking at something complete different to get what I want / need?
According to this post, there is no diagram support in SSDT.

VS style snippets in SSMS 2012. Do they exist?

I am trying to setup a simple snippet in SQL Server management studio. When I heard the word "snippet", I assume that they would work like they do in Visual Studio. By that I mean that there are variables that get filled in, etc... I am not seeing that.
Can someone tell me whether SSMS 2012 supports Visual Studio style snippets. If so, can you provide an example of a snippet that supports variable replacement.
This might be close to what your looking for. Under View->Template explorer is a list of a whole bunch of structures that you regularly use when working with, building, developing databases. You can also get to it using Ctrl+Alt+T. There are literally hundreds in there. Everything from building a view to setting up a trigger to creating XML schemas.
The really nice thing with templates is you can build your own structures that you regularly use. I have built quite of few of my own templates to hold snippets that I have acquired from the likes of Brent Ozars blitz scripts and others like the improved SP_WHO from Adam Machanic and such.
While maybe not as fancy (read interactive) as the ones you'll find in the Visual Studio projects I find them very handy.
If you use these templates there is another little feature that can be very handy. If you press Ctrl-Shift-M (or use the toolbar button that shows an A->B) you get a dialog that lets you easily replace the template parameters with your own values.
Update post research into SSMS2012
I just recently started using SSMS 2012 and see there is a new feature that I wasn't aware of. When right clicking you do in fact see the 'Insert Snippet' drop down. I understand your question better now. Apparently however, these are pretty much the same as what I posted above.

Has anyone written a modern editor for Classic ASP?

I have projects I have to do in Classic ASP. It would almost be enjoyable if I could get some of the same features that visual studio has, such as intellisense for objects (I know you get some from Visual Studio if you have everything in the same file, but there are quirks with that, as well), or the dropdowns showing functions like Visual Studio. It would be especially nice if it would recognize include files and use those as well. It seems to me that enough people are still using it that someone must have written something...
It seems to me that enough people are still using it that someone must
have written something
You'd think that, but I've been looking for the same thing for a number of years, and even started trying to add the language to Netbeans, but nothing I have found yet matches what you can do in DreamWeaver.
It's a rubbish program that crashes a lot and is far too expensive, but it's about the only option I have found that is any good beyond Visual Studio (2008 or less).

Differences between migrating from vb6 to vb2005, vb2008, vb2010

I own a copy of vb2005 professional.
I need to migrate a vb6 project to vb.net
Is there any difference in terms of effort to migrating to these
editions of vb.net
thanks
I think it's slightly easier to target the later versions. I believe the PowerPack 3.0 was added for Visual Studio 2005: it included extra support for emulating the VB6 Printer object and shape controls.
Anyone who's read my other answers about VB6 migration should stop reading now because I've said this before... but I think it's relevant, so I'll say it again anyway.
Check out the Microsoft UK advice with a screencast explaining the 5 basic options for .Net migration. Decide which is best. People may advise you to just rewrite from scratch in .Net. Be cautious about this - you say your codebase is big, which is a danger sign for rewriting. Microsoft UK say
Performing a complete rewrite to .NET is far more costly and difficult to do well [than converting] ... we would only recommend this approach for a small number of situations.
I'm rewriting a lot of VB6 currently and what I've found so far is that the previous developers had to use a lot of third party and custom modules to implement what they need when a lot of it has been included in the base class library for .Net since then.
From what I've seen there's no easy way to migrate from one to another. A lot of effort goes into these migrations. The best thing to consider is whether you want to try to go line by line or examine the code, document core functionality, evaluate how well the software has worked over it's lifetime and then engineer a new design.
That's what I've ended up doing because a line for line rewrite is nearly impossible and a large pain. Compiling libraries and modules into COM to bring the functionality into .Net applications is a lot of effort and kind of a "McGyver" approach. That's why I just documented everything well, understood the process, then wrote as .Net software.
Specifically, what functionality are you trying to maintain? Have you written in .Net before?
In my experience the "migrate" is really a rewrite so it doesn't make any difference what version of Visual Studio you use. I'd use the latest.

Have any vb applications migrated to delphi?

I would like to hear of the experiences of classic vb developers who migrated their applications to delphi rather than vb.net. How has it worked out? Are you glad or sorry that you didn't move to vb.net?
I am not really a vb developer but rather a Delphi developer who was forced to maintain some vb apps for a while. I tried to migrate one vb app to vb.net and after that experience I never tried it again. I successfully migrated several vb apps to Delphi. It wasn't easy and it became a pain in the lower back to find native Delphi replacements for some of the OCXes that had been used (I will never again rely on a third party library for which I do not have the source code.), but it worked out OK.
But as said above: I am an experienced Delphi developer, so I didn't have to learn Delphi at the same time as migrating a vb app. That certainly made it much easier.
I just spotted this on DelphiFeeds:
Delphi for Visual Basic developers
Help to migrate VB applications (knowledge and skills) to Delphi
I had a good friend who moved from Classic VB to Delphi a while ago (back before .NET). He was really happy with the move.
The company he worked for made applications in VB, and they put together a special team (2 developers) to create Active X controls in Delphi for the rest of the company to use. Additionally, when there was something that they couldn't do in VB then the Delphi team would do it. That was when he was introduced to Delphi.
He said it didn't take long before the Delphi team could prototype applications in Delphi faster then the rest of the development group (he never said how large, but way more then two) could. The company never made the switch to Delphi from VB because someone was under the impression the VB was a better solution despite the evidence that Delphi was more powerful and faster.
A few years are I was working with another student on our placement year. We worked for a very large manufacturing company. One of his projects was to create a classic VB app to interface with multiple cameras on a production line and analyse the data in real time. In classic VB this was a shambles - it took on average 1.5 minutes to process a single frame from a single camera (7 cameras at 24 fps) there was no that he could optimise it.
He eventually took the plunge in to Delphi and re-written that app and works fantastically. I've recently been in contact with a few friends who still work there and his app is been running smoothly for 3 years now.
I've worked in both VB and Delphi, and Delphi is (IMO) much less frustrating/limiting. You should be able to use ActiveX / OCX controls as needed (though I agree w/other comments re: avoiding there where you can, and being sure ot have full source code). Apps we've migrated from VB to Delphi (two) have gone well.
I did try in two instance to migrate from VB to Delphi but unfortunately I had to abort midway in one app as it used a lot of third party ActiveX (most from ComponentOne and a few from CodeJoke). We had to abort midway as we could not find any VCL components having equivalent functionality to the ActiveX used in the project.
It was a nightmare for us. Thank god we aborted midway and switched to C#. It was unbelievable that we could get all the features in .NET component to the ditto!
The app we managed to convert, went well off but we had to get rid of a few features that we had implemented in the original software as they required more work in Delphi.