Index: trunk/MagicSoft/Mars/macros/sql/fillcalib.C
===================================================================
--- trunk/MagicSoft/Mars/macros/sql/fillcalib.C	(revision 4870)
+++ trunk/MagicSoft/Mars/macros/sql/fillcalib.C	(revision 4878)
@@ -57,4 +57,5 @@
 #include <iostream>
 
+#include <TEnv.h>
 #include <TRegexp.h>
 
@@ -151,5 +152,7 @@
 void fillcallisto(TString fname, Bool_t dummy=kTRUE)
 {
-    MSQLServer serv("mysql://hercules:d99swMT!@localhost");
+    TEnv env("sql.rc");
+
+    MSQLServer serv(env);
     if (!serv.IsConnected())
     {
Index: trunk/MagicSoft/Mars/macros/sql/filldotraw.C
===================================================================
--- trunk/MagicSoft/Mars/macros/sql/filldotraw.C	(revision 4870)
+++ trunk/MagicSoft/Mars/macros/sql/filldotraw.C	(revision 4878)
@@ -57,4 +57,5 @@
 #include <iostream>
 
+#include <TEnv.h>
 #include <TFile.h>
 #include <TTree.h>
@@ -163,5 +164,7 @@
 void filldotraw(TString fname, Bool_t dummy=kTRUE)
 {
-    MSQLServer serv("mysql://hercules:d99swMT!@localhost");
+    TEnv env("sql.rc");
+
+    MSQLServer serv(env);
     if (!serv.IsConnected())
     {
Index: trunk/MagicSoft/Mars/macros/sql/filldotrbk.C
===================================================================
--- trunk/MagicSoft/Mars/macros/sql/filldotrbk.C	(revision 4870)
+++ trunk/MagicSoft/Mars/macros/sql/filldotrbk.C	(revision 4878)
@@ -63,4 +63,5 @@
 #include <fstream>
 
+#include <TEnv.h>
 #include <TRegexp.h>
 
@@ -213,5 +214,7 @@
 int filldotrbk(TString path="/data/MAGIC/Period017/ccdata", Bool_t dummy=kTRUE)
 {
-    MSQLServer serv("mysql://hercules:d99swMT!@localhost");
+    TEnv env("sql.rc");
+
+    MSQLServer serv(env);
     if (!serv.IsConnected())
     {
Index: trunk/MagicSoft/Mars/macros/sql/filldotrun.C
===================================================================
--- trunk/MagicSoft/Mars/macros/sql/filldotrun.C	(revision 4870)
+++ trunk/MagicSoft/Mars/macros/sql/filldotrun.C	(revision 4878)
@@ -71,4 +71,5 @@
 #include <fstream>
 
+#include <TEnv.h>
 #include <TMath.h>
 #include <TRegexp.h>
@@ -400,5 +401,7 @@
 int filldotrun(const TString path="/data/MAGIC/Period018/ccdata", Bool_t dummy=kTRUE)
 {
-    MSQLServer serv("mysql://hercules:d99swMT!@localhost");
+    TEnv env("sql.rc");
+
+    MSQLServer serv(env);
     if (!serv.IsConnected())
     {
