VB.NET Tutorial - Connect & Query a Microsoft SQL Server Database - Part 1

preview_player
Показать описание
In this VB.NET Database Tutorial, I will show you how to connect and query a Microsoft SQL Server database from your Visual Basic .NET application. We will build an improved connection control class for simplified access to our database.

Additionally, we will create a database search feature with wildcard support and populate a DataGridView and ComboBox with a database query.

SHORTCUTS:
0:25 Preparing the database
15:34 Creating your application
26:35 Building your SQL Control Class
1:06:00 Using the SQL Control Class
1:09:10 Query SQL to a DataGridView
1:16:33 Building a parameterized search with wildcard support
1:24:04 Populate a ComboBox with SQL Query results
1:30:30 Error Testing

PROJECT SOURCE CODE:

Thank you for your support!
Рекомендации по теме
Комментарии
Автор

Thank you very much for a well-organized, clear tutorial. I did a lot of VB4 programming in the 1990s but none since. I retired a few years ago and wanted to resurrect and continue a project I did back then. This video served as a great refresher and I am ready to continue your series.

kng
Автор

Thank you very much for this. It's very useful and I like your laconic style :-) I'm using VS2019.

I'm 72 years old, retired, and I'm having fun exercising my mind learning VB.net and Visual Studio. I've been programming off and on since the late 1960s. The off periods were when I was managing mainframe software projects, doing strategic planning and being an IT Director for an insurance company. Programming is more fun. I started with FORTRAN at uni, then went onto Assembler, machine code, COBOL, ALGOL with Burroughs, used Burroughs DMSII, IBM's IMS, Digital's Rdb until I retired from the corporate rat race, bought a copy of Access when it was first released and had to learn VBA. I learned enough VB6 to modify existing systems. I got into SQL Server in 1997 and became an accidental DBA. I had such a lucrative business developing systems with Access front ends to SQL Server that I never got around to learning .net. I became fluent in T-SQL. I've flirted with learning VB.net a few times, but commercial pressured got in the way. I subscribed to an online learning company and didn't get much satisfaction. This tutorial of yours is exactly what I've been looking for to learn VB.net and how to interface with SQL Server. You explain things at the level I need. Thank you very much.

roadie
Автор

I've found this video equal parts challenging and rewarding. Rewarding because it has expanded my knowledge about databases and how sql works. Challenging because there are aspects of the coding that are above my self-taught level. To that extent if there is anyone who would be kind enough to show me how to make use of the Over-ride code in very very simple terms I would be extremely grateful. Thank you.

UPDATE: I have done some thinking and reading and I re-watched this video and realise that the answer to my question was there all along - I just didn't understand enough to fully recognise it. Thanks for this video - it's been a great catalyst for learning so much new material for someone who started learning Vb by hacking excel macros.

Many thanks.

grantharrismusic
Автор

So how do you use the conneciton override you talked about? I would like to open another form and get user name and password info from user and then when they click the Search button it uses that for the connection. However, I run into lots of problems with not initializing the conenciton string on startup.

misperry
Автор

My good sir, you are a lifesaver. I should browse through your channel. i have a feeling you will become one of my best teachers!

chloekimball
Автор

Hi, many thanks for this VB tutorial, by far is the best from what i found on YouTube so far and i was looking for a while (few months).

mariusadrianstefan
Автор

Thank you so much! These DB tutorial videos are super - I've learned a lot. Your content is well laid out and your presentation is excellent.

fletcherevans
Автор

Just started this SQL series of videos after your Access ones. Excellent and a lot to learn😊

pw
Автор

Your tutorials are too good to exist. 10000/10

poweroverwhelming
Автор

Great detailed intro to using VB.NET with SQL Server... Thanks... Mike in LA, Calif, USA. Believe it or not I have made tons of money using MS Access/VBA as a front-end to SQL Server on a LAN because it's much quicker to build with and has a great report writer built-in. But at some point you will outgrow MS Access as a front-end(you can still use it for other smaller apps), and need more speed and more options as a front-end and that means going to C# or VB .Net Winforms(or WebForms - ASP.NET) to re-create that front-end. And that's me now... LOL... Thanks again for the info.

unicomp
Автор

Hi VBToolbox. Glad to see you active again. I hate moving too--I think most people do. At 66 years old I have done it 20 times so far in my adult life. I followed many of your DB tutorials in the past, and am waiting to see what you will present next. When you fill the combo box you can use a row index like r(0) instead of the column name. No big deal. It's just shorter.

randysandberg
Автор

never seen like the way you teach before, thanks a million....
wish you could post more of tutorial

aungyethu
Автор

Thank you so much
You're doing a great help to the generations of learners

leansixsigmabusinessoperat
Автор

THank you I'm newbie and I really appreciated your work here <3

ranie
Автор

dude i love you so much right now, you just saved me from the fucking assignment. thank godness i find you here

boundhell
Автор

You little marvel! You've gone and made functions into programs!!

anthonypulsejr
Автор

GREAT tutorial, dude you have saved my application. I haven't done much newer VB but was pretty awesome with VB6. I've got my application together but for the life of me cannot get the "built in" stuff to work with the logic I need. I had realized that the default controls were not going to be much help but it's not like you see their code so there is nothing to change. Tableadapters seem to be a nightmare. This sqlcontroller class is EXACTLY what I was missing.
JAW

TheJawtech
Автор

OOOH BUSTED, you gave it away! I saw that WoW folder, lol. Tell me you're not a night elf hunter named legolas :P

jasonjason
Автор

I just discovered your channel and Holy adsadjaskdsajd you are saving my life now. I wonder why you don't get million of views! Thank you so much bro

rowanbalana
Автор

Awsome!! I've litteraly just finished Part5, and was a little sad to miss the "User Manager" -part. And then the Updated version you mentioned 10 months ago, suddenly pops up.
Thanks - your tutorials are really useful & informative. I'm learning a lot from you!.

VaderFaderVader