Friday, December 12, 2008

sample code post - DB Broker

public int ObrisiSveZaUslov(IGhost ighost)
{
string upit = "DELETE *" +
" FROM " + ighost.ImeObjekta +
" WHERE " + ighost.UslovZaNalazenjeSlogova;

var komanda = new OleDbCommand(upit, konekcija, transakcija);

try
{
return komanda.ExecuteNonQuery();
}
catch (Exception)
{
throw new Exception("Greska u radu sa bazom! Brisanje po uslovu");
}
}
пример методе DBBroker-a.

2 comments:

Sonny said...
This comment has been removed by the author.
Sonny said...

Hey buddy, how did you get the code snippets working??

http://feeds.feedburner.com/alisteroz