Advertisement
Guest User

Untitled

a guest
Oct 27th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. Server=127.0.0.1;User=SYSDBA;Password=masterkey;Database=d:\Navyk-Dev\Navyk\DB.fdb;Charset=UTF8
  2.  
  3. public string Load(int id) {
  4. string result = "";
  5. using(var conn = new FbConnection(NavykConfig.Config.Db.ConnectionString)) {
  6. conn.Open();
  7. using(var cmd = new FbCommand(string.Format("select scenario from Scenarios where id = {0}", id), conn)) {
  8. using(FbDataReader fbDataReader = cmd.ExecuteReader()) {
  9. while(fbDataReader.Read()) {
  10. result = fbDataReader.GetString(0);
  11. }
  12. }
  13. }
  14. }
  15. return result;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement