SUPERMAN89
Expert Member
Anyone know a simply way to just enter a name into a textbox and search a database for that name and return in a msgbox if that name is in the database. the internet and msdn just doesnt have what im looking for!
South Africa’s biggest forum. Discuss, discover, and connect with thousands of members.
reader.Close();
reader.Dispose();
command.Dispose();
Sure, make use of using statement if you love try..catch..finally in your actual code. I don't therefore I don't use them.
Effectively I see this alot:
try{
using (...){
...
}
}catch (Exception ex){
}
effectively your code now read like this in the compiler
try{
try{
...
}
catch(){
}
finally{
}
}
}catch (Exception ex){
}
se excuse me for trying to optimise my Psuedo code.
try
{
//Do
//Dispose
}catch(...)
{
//Handle
}
try
{
//Do
}
catch(...)
{
//Handle
}
finally
{
//Dispose
}