
Follow along a step-by-step course to build c# database driven windows forms apps with visual studio and microsoft access, binding records and tables to form controls.
Build a Windows Forms data entry prototype with five text boxes. Display input in a message box and use a timer to measure and pause entry.
Build a C# Windows Forms app by creating a form with data entry and timer groups, adding labels, text boxes, and controls for accept, clear, start, pause, and exit.
Set tab order and indices in a C# WinForm app, disable and format the timer display, and make the time read-only. Implement Alt-key shortcuts by adding ampersands to control buttons.
Develop and wire up clear and exit button events in a winform app: exit closes the form, while clear resets all text boxes and returns focus to the name field.
Declare elapsed time as a TimeSpan and last elapsed as a DateTime to preserve progress when pausing, set the timer interval to 1000 ms, and start with a Start button.
Set up a timer tick event, name the handler, and compute elapsed time with now minus lastElapsed, then display hours:minutes:seconds in a text box.
Implement the start button event to control the timer, toggle start and pause buttons, enable the data-entry group and text boxes, and initialize last elapsed with now.
Implement a pause button that enables the start button, disables the pause button, and disables the data entry group, while the timer pauses and resumes in a WinForms app.
Create a data entry section in a C# WinForms app by collecting text box input, validating all fields, and displaying the data in a message box; ensure zip digits only.
Set up a shared enter key press event for all text boxes to auto-advance focus to the next field, with the final zip box moving to the accept button.
Master handling key press events in a winforms form by casting the sender to a text box, detecting enter, and moving focus through name, address, city, and zip to submit.
Validate the key press to allow only numbers and backspace in the zip code text box, using sender checks, character range tests, and input handling.
Create and handle mouse events in a WinForms data entry app to change a button's back color on hover and restore it on leave using system colors.
Wire a shared mouse event for multiple buttons using the sender object, cast to Button, and change the back color; rename the handler for clarity and verify initialization in InitializeComponent.
Explore how the Windows Forms designer generates the InitializeComponent method, wiring up drag-and-drop components and events, and why renaming elements requires updating both the designer and code behind.
Understand how databases store data in tables of records and fields, how primary and foreign keys create relationships and support one to one, one to many, many to many joins.
Explore a book database schema with authors, titles, and publishers, connected through the title_author table to model many-to-many authorship and one-to-many relations via ISBN and author IDs.
Explore c# database objects such as connection strings, open/close operations, data containers, and command objects to run queries, retrieve resultsets, and navigate or update records.
Explain the C# connection object and its connection string, including database name, data source, and state, and use open, close, and dispose methods.
Connect to a Microsoft Access database using an OleDb connection string in a Windows Forms project, display the connection state in a text box, and demonstrate opening, closing, and disposing.
See how command objects and a connection string drive data adapters to execute insert, delete, update, and select operations, with one data adapter per table to view and update data.
Explore data table overview in C# winform apps, showcasing datasets and data tables with records, rows, and columns; learn editing, clearing, copying tables, and locating specific tables.
Learn to query a database in a C# winform app by creating a command object with a connection, then execute select all from titles and bind results via data adapter.
Learn to create and initialize a data adapter with a command and connection to execute a select all from titles, then dispose the adapter after use.
Create an in-memory titles data table, fill it with a data adapter from a select all titles query, bind the results to the Windows form controls, and dispose when done.
Bind form controls to database fields in a C# WinForms app, using label, text box, and picture box for simple binding, and list box or datagrid view for multi-item displays.
Create a data-bound winform by adding labels and text boxes for title, year published, ISBN, and publisher ID, binding to titles table and enabling record navigation with a currency manager.
Explore how the currency manager navigates rows, edits, adds, and deletes records; bind controls, track row count and current position, and use methods to add, cancel, or remove records.
Explore how to navigate records in a C# WinForms data-bound app using a currency manager and binding context, with four navigation buttons (first, previous, next, last) and data-bound text boxes.
Use the wizard to connect to a database, select the titles table, and bind title, ISBN, and publish ID to a binding source and adapter.
build a winforms app connecting to the norsemen database customers table, displaying id, company name, contact name, and contact title in text boxes with first, previous, next, and last navigation.
Create a new winform project, design a customer form with labels and text boxes, add first/previous/next/last navigation, and configure an OLE DB connection, command, adapter, data table, and currency manager.
Create a string connection for the North Wind Access database, open OleDbConnection, and select all from customers with OleDbCommand. Fill a DataTable with OleDbDataAdapter and bind to the form.
Bind data to text boxes in a WinForms app using the customer table fields—customer id, company name, contact name, and contact title—and configure a binding context to navigate records.
Navigate Northwind records in a c# winforms app using the currency manager, update a zero-based position via start, previous, next, and last using count, and dispose connections for safe testing.
Build a simple WinForm app to practice SQL by typing statements in a text box, executing them against a database, and viewing results from the books, titles, and publishers tables.
Create a C# WinForms form with a multi-line text box for SQL commands, a button to execute, and a label to display the record count from the database.
Create a form-level connection, open it on form load with a using statement, and use a books database connection string; build adapters and commands on button click.
Create and manage database commands with a command object, adapter, and data table. Execute queries, bind results to a grid view, display the count, and dispose connections on form close.
Practice running a winform app that connects to a books database, retrieves 1988 titles by joining titles, title_author, and author tables, and sorts by author descending.
Create a winform that displays books data from a database, showing author, title, and publisher, and programmatically generate filter buttons for author initials with a single event handler.
Create a new c# winforms project with a blank form to display database records, add a button to show all records, and implement programmatic, letter-based filtering (A) for authors' names.
Programmatically create and arrange 26 letter buttons in two rows on a WinForm, calculating each button's width from the form's client size during the form load event.
Create 26 buttons programmatically in a winforms app, label them A–Z using ASCII codes, arrange them in two rows of 13, and wire a shared click event.
Establish a persistent database connection with a connection string, open and dispose it as needed, and construct an SQL query with a where clause to fetch authors, titles, and publishers.
Develop the SQL query command for a WinForms app by handling button clicks, determining the clicked button, and building a like-based where clause to filter authors by starting letter.
Construct and execute the database command using a command object, adapter, and data table. Bind the results to a grid view and handle errors with a try-catch and message box.
Run the program to display all names, authors, and titles; filter results by starting letter or show all records to populate the view.
Begin the main project by learning to display, add, edit, delete, and search records across multiple tables and forms, including passing data between forms and searching authors and publishers.
Create an authors form in a C# WinForms project with id, name, and year born fields, plus previous and next navigation and save, cancel, new, delete actions.
Create form level objects—connection, command, adapter, data table, and currency manager—then connect to the books database, load authors ordered by offers, and bind results to id, name, and year born.
Navigate between records using the currency manager by adjusting Position property with previous and next actions, verify binding, and dispose the connection, command, adapter, and manager when the form closes.
Set up save and delete events in a C# WinForms app by showing an information message box after saving. Capture yes/no with a dialog result and delete only on yes.
Design application states to prevent wrong input by enabling save and cancel only during edit or add, while viewing keeps text boxes read-only and author ID non-editable.
Set application state via a switch that toggles view or add/edit modes, adjusting text box editability, colors, and button availability, and focusing on author name for new records.
Learn to manage application states in a c# winforms app by switching between view, added, and add states, handling save and cancel, and enforcing read only author id.
Validate numeric input by handling the text box key press event, allowing digits 0–9 and backspace, and showing a wrong input label when invalid entries occur.
Create a reusable boolean validator to ensure the author's name is entered and the birth year, if provided, is a four-digit number not in the future.
Handle author name key press in a WinForms app, manage focus across text boxes in add and edit states, and move focus to the next field on enter with validation.
Wrap database operations in try-catch blocks to show friendly database error messages and manage connections with a DBI error flag; apply this to save, delete, and add actions.
Create a publisher form for a winform app by mirroring the office form, adding input validation and try-catch, and adjust the startup load order to test saving, deleting, and editing.
Design and build a publishers form in Windows Forms by adding labels and text boxes, a read-only publisher id, and action buttons like previous, next, save, and cancel.
Create and connect to a database by defining connection, command, data table, and data adapter for publishers, then fill and bind records to text boxes in a step-by-step WinForms workflow.
Bind publisher table fields to text boxes using data bindings and a currency manager to navigate records, with a try-catch for friendly connection error messages.
Explain implementing a three-state publishers form with a set up state method, toggling text boxes between read-only and editable and enabling the proper buttons for view, added, and edit.
Implement input validation for publishers in a database-driven winforms app, ensuring the publisher's name is required, using try-catch for add and edit operations, displaying messages, and guiding focus between fields.
navigate publisher records in a C# WinForms app by using the enter key to move focus between text boxes and manage closing, disposal, and save, edit, or delete operations.
Demonstrates saving records in a C# winform app by validating input, using try-catch, and updating the database with a command builder and data adapter.
Fixes a saving bug in a C# WinForm app by unbinding the year born text box to allow blanks, updating the current author record, and re-binding to reflect changes.
Delete an author in a C# WinForm app by removing it from the in-memory list and issuing a delete command to the database, respecting referential integrity.
Add new records by appending to the in-memory list and saving via the update workflow, while debugging to fix the id retrieval on new records.
Organize add, edit, and delete workflows with an application state property, adjusting the form and enabling actions. Use save logic to add or update records and refresh the view.
Add and save a new author record in a WinForm app, sort the table by author with the default view, then locate and select the newly added record.
Add first and last navigation buttons to the authors form, wiring click events to set the position to zero or count minus one and close the form, with final tests.
Implement publishers database operations with save and add new record, navigate first and last records, refresh after add, and address optional field editing issues while ordering by publisher names.
Implements first and last record navigation for publishers in a C# WinForm project by adding two buttons and setting the position to 0 or count minus one.
Learn to implement a save workflow for publisher records in a winform app by unbinding optional fields, binding text boxes, using a command builder, and preserving the current record position.
demonstrates saving and editing publisher records, validating required and optional fields, and enforcing string constraints in code while refining database design to allow zero-length optional fields.
Add and delete records using publisher manager to modify the in-memory list, then save to the database with the save button; test adding and deleting records in the publisher table.
Implement publisher form states with an application state property and state method to toggle text boxes for add, edit, and delete. Add a search to locate records across the publishers.
Add a search text box labeled search for publisher with a search button to display records; enable first and last navigation in view mode and close the form when finished.
Implement a publisher search requiring at least three characters and non-blank input, using a case-insensitive partial match with wildcards, returning first match after sorting by name, or no record found.
Set the application state for authors form's first and last button, add a text box and a search button to query records with the like command, mirroring publisher's form.
Add a search feature to the authors form by placing a search text box, label, and button, then configure application state enablement before coding the search.
Validate search input to three characters, use a like query to find authors, store results in an array, display the first match, and disable search during edit or add.
Fix a binding issue in a C# WinForm app where editing clears the author born textbox without saving, and rebind on cancel by checking the application state.
Fixes the add new workflow in a c# winforms app by canceling blank records, preserving the current position, and capturing textbox data before saving to keep the display in sync.
Apply cancel current edit in the publisher manager to stay on the same record when canceling or adding a publisher, using the current position to preserve the record.
Create a final form that links titles, authors, and publishers using title, publisher, and offer_ISBN tables, with text boxes and drop downs for seamless association and data integrity.
Create a titles form displaying all title fields (title, year published, ISBN masked, description, notes, subject, comments) with search and 13 action buttons, plus navigation to authors and publishers.
Connect to the books database in a winform app, create and bind a titles table to form controls, and navigate records using a currency manager, adapters, and data bindings.
Navigate between records with the titles manager (first, last, previous, next) and validate searches with at least three characters, using a like search with wildcards to display the first match.
Implement an application state for titles using a switch (view, add, edit) to toggle text boxes and navigation. View mode: read-only fields and non-editable isbn; add/edit: enable edits, disable navigation.
Enforce input validation for titles by requiring a title, validating the year against the current year, and checking ISBN is 13 characters, then return a boolean to guard saving.
Enable edit and add workflows by unbinding the year published field and binding it for saving, using an application state property to switch modes and implement save and exit actions.
Save the record in add or edit mode by validating input, locating the current title by ISBN, updating or adding via a command builder, and showing a 'record saved' confirmation.
Learn to implement a delete operation in a C# WinForms app: prompt for confirmation with a yes/no dialog (default no), delete via the titles manager, handle errors, and verify removal.
Understand how to cancel a new or editing record in a C# winform app by restoring the original record, preserving current position, and re-binding controls to the database when needed.
This lecture demonstrates a bug fix in a C# WinForm app by handling the year published text box key press event to allow only digits and backspace, blocking letters.
Demonstrates a winforms title entry form with four author dropdowns and one publisher dropdown, ensuring selections come from existing records and including delete buttons for authors.
Create database objects for the title and author tables in the books database using commands, adapters, and data tables; bind four authors with combo boxes and link via title_author.
Load the titles form displays the first title and binds offers; assign each author to its combo box and populate with author names and IDs using display and value members.
Query the title_off table to fetch authors for a specific ISBN, populate author dropdowns, and refresh them as you navigate between records.
Clear all combo boxes by setting each selected index to -1, then bind the database to the controls and load the corresponding author and title data for each ISBN.
Remove authors from the dropdown by using a single click handler for all buttons, identify the clicked button with sender, and clear the related combo box (selected index -1).
Use application state to toggle author dropdown and action buttons between view and edit modes, disabling controls in view state and enabling them during editing or adding a new record.
Update and save title and author–ISBN associations in a C# winform app, using data tables, a command builder, and four combo boxes to update the ISBN offers table.
This lecture shows updating the author and publisher fields when searching for a title by calling the related data method and refreshing the display, illustrated with paradox.
Bind the publisher ID in the titles table to a combo box, set display and value members, and ensure the correct publisher saves and displays for each ISBN.
Create and bind a publishers data table with a command adapter, populate a combo box displaying publisher names and using publisher IDs to link to titles, with view/edit state controls.
Create an authors form object and display it as a modal dialog with showDialog, then refresh data by reopening the connection and reselecting authors.
Open publisher form from title form, re-establish database objects and publisher data source, update the publisher, and return to the title form with the current record and refreshed combo box.
Create and open the publishers form with show dialog, reload publishers data via a data adapter, and bind it to a combo box to reflect updates in a winform app.
Test adding, deleting, and saving author, publisher, and title records in a c# database driven winform app. Identify dropdown and navigation issues after edits and fix author associations.
Debug the c# winforms app by running in debug mode, placing breakpoints on the save operation, and fix record positioning to ensure isbn and title save correctly.
Display search results in a list box, then pass the found records to a search form via a constructor to show data and return the selected entry.
Populate the list box with titles from the database, display only the title field, and pass the selected index back to the titles form to reveal full details.
Connects the office form and publishers form to share the selected index, using index 1 for names and index 0 for IDs with a form argument and switch.
Add a print button to a C# WinForms app and print a single record by wiring a print page event to a print document.
Implement a print page event handler to render a header. Use a black pen and Arial 24 bold to draw a centered 'books database' header inside a header rectangle.
Print a report header with the book title and authors in a WinForms app, using font 12 regular, measured spacing, and coordinates; print multiple offers or none when absent.
Print the remaining fields in the WinForm app, including ISBN, year published, publisher, description, notes, subject, and comments, adjusting margins and spacing, then test the output.
Build an airline reservation system in a WinForm app, using three tables and parameterized SQL commands to manage seats, passengers, and waiting lists; practice joins and unions.
Review the database structure with three tables—passengers, seats, and passenger seat—that link by IDs, showing five rows of seats a–d with none taken, and waiting-list status for passengers.
Explore three forms in a C# Windows Forms app: the main form with seating layout and passenger entry, a results grid, and a details form for editing or deleting records.
Create a public database objects class with a static connection string for easy access across the WinForm app, connecting to a Microsoft Access database on the c drive.
Create a public passenger class for in-memory input validation; implement a method that trims spaces and checks for blank names, returning true if valid and false otherwise.
Create a seat class with properties for seat id, row, column, and a taken flag to enable input validation, plus seating list and database access via command and data reader.
Implement a public bool method isPlaneFull that uses a using block to open a connection, query seats where taken = false, and return true if no rows exist.
Create a public boolean method isSeedAlreadyTaken that uses a parameterized query against the seeds table, matching row and column with isTaken = false, returning true if the seed is taken.
Outline the methods and events needed for a C# database-driven WinForm app, including load, add, search, and display logic, with dynamic seating and row population.
Create passenger seat objects and a static seats list, wire up private database objects, and implement load-time methods to display seats in a listbox and populate a dropdown.
Clear the list and the seeds list, then load seats from the database with a using block, ordering by row and column, and format four seats per line.
Open the database connection, execute a select query on seats to fetch distinct seat rows ordered by row, and fill the dropdown with unique values using a data reader.
Create passenger and seat objects, loop through radio buttons with a lambda to find the checked one, validate name and seat, and show a message box on invalid input.
Validate plane capacity using the seat object, offer a waiting list via a yes/no message box, then insert passenger data and seat linkage with parameterized SQL commands and max-id logic.
Demonstrates validation by attempting to add passengers with missing information, checking for a full plane and taken seats, and validating the waiting list workflow and database insert logic.
Insert the passenger into the passenger table, mark the seat as taken in the seats table, then insert the passenger id and seat id into the passenger seats table.
Test adding a passenger by fixing the update statement in the seats table to mark taken seats, seed data, and verify passenger-seat mappings in the database.
Learn how to query all passengers by joining three tables in microsoft access, using aliases and unions for waiting list, then load results into a data table for lookups form.
Enter a search name in the text box to filter passengers by names like the input, using a sql where clause and a parameterized wildcard, and search when not blank.
Learn to pass a data table between forms and bind it to a grid view, load and display passenger details, search results, and validate input in a C# WinForm app.
Learn to implement a DataGridView click event to capture the selected passenger ID, query passenger and seat data, and pass results to an edit/delete form.
Develop an edit and delete passenger form that binds controls to a data table, validates name and waiting list or seat assignment, and updates passenger and seat records.
Bind the form controls to the database by creating the table, command, and reader, and map passenger id, name, and seat to text boxes, dropdowns, and a waiting list checkbox.
Validate passenger name is entered, ensure no conflict between waiting list and seat assignment, require either the waiting list checkbox or both row and column selected, then update the record.
Open the database connection, fetch the seed by row and column, and verify availability. Then update the passenger record or handle taken-seat conflicts in a C# winform app.
Update passenger records and seat assignments in a C# WinForm app by modifying passenger name, waiting list status, and reassigning seats with parameterized SQL commands.
Test and update passenger seat assignments in a C# WinForms app, validate seat availability, manage waiting lists, apply a blank-seat safeguard by defaulting to zero, and verify updates and deletion.
Delete a passenger by confirming with a message box, remove from the passengers and passenger seats tables, update the seats table to free the seat, and confirm deletion.
congratulate learners on mastering the basics of database operations with c# and access. pursue object oriented programming to build an extensible app and explore security for multi-user web deployment.
WARNING! Some students reported that the MS Access database used in this course will not work with the current version MS Office 365, even with legacy MS Access database redistributable engine. In majority of cases the issue is solved by installing 2016 version of the MS Access database redistributable engine (please see Q&A section of the course). If this doesn't work for you and you experience problems after purchasing the course, please note that Udemy offers 30-day money back guarantee.
I created this course with a C# beginner in mind. Someone, who knows the basic C# concepts, and knows his way around loops, conditional statements, arrays, and very basics of object oriented programming, but never really had a chance to incorporate any of it with a relational Database project. If that describes you, then this is definitely a course for you.
For this course, I decided to use a Microsoft Access database, as that is a common database small business use around the world. Now, full disclosure: we won't be creating any earth shattering application and there will be a lot of room for improving our code. What we ARE going to be doing is LEARNING how to use with C# with MS Access, and we'll use a simple, but fairly common scenario - a small books database app.
The goal of this course is three fold
First, is to show you how things work
Second, help you understand how things work under the hood.
And third, to drill the basics so that they become a second nature to you.
This course concentrates solely on using Access database with C
We will use Windows Forms as the user Interface and we'll use form events to code the application logic to. This way, we won't get distracted with million other little things that come into play for truly well designed commercial app. Like I said, the goal here is to LEARN the basics, and to RETAIN the knowledge.
From my own experience, from the beginners point of view, nothing is worse than taking a course to learn the basics, only to suddenly be introduced to a dozens of advanced real world concepts, that completely derail you from learning what you came here to learn in the first place...which is, the basics. What good is it for a beginner to watch someone build professional grade app when three quarter of the stuff presented goes right over your head? Not in this course.
However, with that being said, if you go through this course, and if you code along, I am absolutely sure that at the end, you will have great foundation to build on, and you will be able to move to more sofisticated applications and coding styles.
The course consists of several sections. The first few sections introduce the basic concepts, such connecting to database, browsing through the records, binding database fields with form objects in the windows forms and other core concepts related to databases as well as windows forms.
First project is a small Data Entry application. This project does not include database yet. We will create a simple data entry form and explore few properties and form objects. This project serves as a simple introduction or a refresher, and if you are familiar with basics of windows forms and the concept of properties and events, then you can safely skip this project. However, there still may be a few things you could learn from this project, as we will be working with timer, key press events, mouse events, and form elements in the run time.
Second project will be a mix of theory and practice. We'll spend a few minutes going through some basic theory where we will discuss some basic database concepts, SQL commands, and C# database objects and after each lesson, I will demonstrate a practical use of each of the concepts.
In our third project, we start putting the theory into practical use. It'll be just a simple project that loads data into our form from one table, but we will see in action how to connect to the database and how to select records from the table. Ir will also be a little departure from previous examples, as we will use a different database.
Fourth project is na SQL tester. Here, we will be able to test SQL commands. We'll use all the knowledge we acquired thus far, and introduce some cool techniques in the Windows Forms allowing us to create form elements at run time. And, we will have a small, but functional practice environment for SQL commands.
Fifth project is the last, and most comprehensive one. We will create a small books database app. Until this project, we were only displaying records, but now, we will learn to add new records, edit or delete existing records, we will work with multiple forms and tables, put in place an application state for different actions - such as enable and disable controls based on user's action, and also learn how to pass data from one form to another.
This whole course is designed as follow along course. Meaning, you are encouraged to code along with me. Everything is on the video, there are no code snippets being magically pasted into the Visual Studio. Also, I don not want you to just learn the concepts and then forget them a week later. I want you to remember and retain what you learn in this course.
And let's face it - that is only possible when you not only work on the project along with me, but also try to do the exercises. Trying to solve problems on your own is at the core of learning to program. However, I won't just leave you figure things on your own, I am well aware that sometimes it may feel overwhelming. So I will also show you my solutions.
And one more thing that makes or breaks learning to program - using what you learn, and using it frequently. Therefore, I code even the repetitive things from scratch and I don't simply just refer you to previous lessons. But that means, that if you just watch the course, it will feel repetitive. However, if you actually code along, I guarantee you will feel like you learn, and also REMEMBER what you learned.
But, If you prefer more instructional videos, that show everything once and move faster, then this course is not for you. Please keep that in mind before purchasing the course. I encourage you to watch some of the sample videos so you get a feel for the course structure and my teaching style.
Now, I made the videos short and to the point. Most videos are only around 5 minutes long. That is deliberate, so each video is a small learning step that is easy to follow.
Alright, there's a lot of coding to be done. So let's get to it!