Hello, Im doing a big final project that manages a dive shop. This application will have data base. What im looking for is some example of solution that works with data base(connect to DB , SQL , Query) that i can take and modify it for my needs.
I understand that article is from 2007, but I'd completely disregard it. It was completely bad practice even "back then". Definitely is horrible practice today. Use a proper data access layer like EF, nHibernate, etc. At the very least, if you use barebones ADO.NET, you should not write queries in the C# code like that. Completely vulnerable to a script kiddie who knows SQL injection.
Completely vulnerable to a script kiddie who knows SQL injection
Bullshit -- it fully and easily supports parameters so there's no reason a developer has to leave himself open to that.
EF, nHibernate, etc
And what do you think they do in the background? Exactly the same things I do. Everything has to go through a command and connection eventually; I cut out the middle man. Additionally, those tools may not support whatever database the OP has to use, whereas there is probably an ADO.net connector for it.
but personally I dont think there is anything wrong with using ADO.NET, SQL Injection is only possible when there is a lack of parameterised queries.
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch