Doubts about table of states and cities

Asked

Viewed 103 times

0

Friends good morning. I have a question, on the best way to fill a combobox with information of State and other with information of city.

My doubt, consists in, what would be better in question of performance, or in question of good practices?? have a table in the bank, and whenever you run the form, it queries the bank? or set this table directly in the code, because the states will not change and the cities also not.

thanks

  • 5

    If you choose the bank you can run this Sql

  • 1

    Marconi, perfect. very good it on. thank you.

1 answer

2


Of course, in terms of performance, it is better if the information is defined directly in the code, as it avoids communication with the database or any other structure that makes it available.

Speaking of good practices, as a rule, defining "hard coded" structures is not a good practice, because whenever something needs to be changed, it is also necessary to compile the application.

Finally, everything depends on your requirements and what the application itself requires.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.