NEW TO VS: Multi Database Forms Referencing Help

85508707 21 Reputation points
2021-11-18T13:37:54.043+00:00

I am new to Visual Studio and have the Community version. I'm currently attempting to create my very first database reference application working off a database for my job. I'm trying to make it so when an employee enters a number into one text field it searches 2 different databases and displays the corresponding information in a series of six other text boxes. I also want to create 2 small pie graphs representing our remake numbers on the products we use. This is a home project that I want to develop for possible use at my job if my boss likes it. I'm very new to VS but here is a list of what I have created so far.

  1. VS Basic Forms .NetFramework 4.8 Project
  2. Main Form Created/Scaled/Named
  3. Six different Text Boxes and Labels all named to what they are and all fonts and styling complete
  4. Auto Sized all aspects
  5. Created and loaded 1 of 2 data sources (One is already made and used on a daily basis the other one will be made in this process I believe)
  6. Organized the GUI to standards and all items placed
  7. Added logos and some code options so when you click on the logos it shows info about the logos

This application is experimental and I'm not sure if it will even be used but I want some help on developing the references as I have no experience in creating data references.

The first thing I want to do is when a case number is entered in the first and only editable field by a scan gun acting as a keyboard it references the 2 databases (IE: if a person scans a barcode, the gun already converts it to text and enters it where your cursor is (In the text box that is editable). In this case an employee will scan a barcode that says "2021-1000" and that number will be entered into the text box. Then I want that number to reference info on the two databases and generate responses to the case number and display those in the other text boxes as well as calculate the pie charts.)

If anyone on here would want to help guide me through what all the data references mean and how to link one item to another I would appreciate the help. I'm not asking you to do this for me, just asking someone to help teach a new VS user how to operate and create effective programs for home and small businesses.

FYI: None of my applications I make will be used for monetary gain, I'm just really interested in creating cool applications that are simple and easy to use plus I like computers and never had an opportunity to get into application design.

Any help would be appreciated

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,677 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,223 questions
{count} votes

Accepted answer
  1. Karen Payne MVP 35,031 Reputation points
    2021-11-19T21:19:18.87+00:00

    My recommendation would be to use Entity Framework 6 since you are using .NET Framework 4.8. If you were using .NET Core I would then recommend Entity Framework Core 5.

    There are many benefits to Entity Framework (any version) but also will take time to get the hang of it. The best thing is once you have configured Entity Framework using database first with code is if anything changes in the tables from table names to column names to data types you can regenerate the models (models = tables),

    Going another path, using data providers rather than Entity Framework is a possibility yet I would not go in that direction unless you really understand how to code with data providers. I've done both and after Entity Framework find if hard to go back to data providers.

    Concerning searching two databases, if on the same server with same configurations that is easy while if data is different between the two databases, still easy but a tad more coding (and we here all like coding)

    Regarding I can email or DM you a video that is unwise to share your email here. If you happen to know how to use Visual Studio Live Share than that is a better option.

    In regards to showing information in TextBox and other controls there is data binding.


0 additional answers

Sort by: Most helpful