How to insert data from the database into the listbox without pressing any buttons, and when opening the window? 
- Use Form.Load - Alexander Petrov event
|
1 answer
- We connect Entity Framework for work with a DB
- We turn the necessary data set from the table into List / Array
- Vesham on Form.Load that he should pull the data sheet out of the database context and draw it
Using the Entity Framework in C ++ Cli
Common problems with connecting the Entity Framework in C ++
- In the question there is not a word about the Entity Framework. - Alexander Petrov
- @AlexanderPetrov user is a new member, MySQL was mentioned in its question, and if so, to give solutions in and out. - Marat Zimnurov
- oneThe author asks how to make the download when opening the form, without pressing the buttons. Answer "from and to": add the load code to the form constructor, override the
OnLoad/OnShown, subscribe to theLoad/Shown. And it would be good to give code examples for each variant. - Alexander Petrov - oneWhy did you mention only EntityFramework? If we are to suggest ways to work with RDBMS, then describe all the main options: raw ADO.NET (connected and disconnected levels); micro-ORM: massive, petapoco, dapper; large ORM: EF, linq2db, NHibernate ... I call this "from and to". - Alexander Petrov
- @AlexanderPetrov with this, I agree, my mistake, I will rewrite my answer closer by the evening - Marat Zimnurov
|