Skip site navigation (1) Skip section navigation (2)

SVN Commit by dpage: r4466 - trunk/pgadmin3/src/agent

From: svn(at)pgadmin(dot)org
To: pgadmin-hackers(at)postgresql(dot)org
Subject: SVN Commit by dpage: r4466 - trunk/pgadmin3/src/agent
Date: 2005-09-26 13:29:29
Message-ID: 200509261329.j8QDTTcJ021475@developer.pgadmin.org (view raw or flat)
Thread:
Lists: pgadmin-hackers
Author: dpage
Date: 2005-09-26 14:29:28 +0100 (Mon, 26 Sep 2005)
New Revision: 4466

Modified:
   trunk/pgadmin3/src/agent/dlgStep.cpp
Log:
Correct job step database name handling per Regina Obe

Modified: trunk/pgadmin3/src/agent/dlgStep.cpp
===================================================================
--- trunk/pgadmin3/src/agent/dlgStep.cpp	2005-09-26 08:00:36 UTC (rev 4465)
+++ trunk/pgadmin3/src/agent/dlgStep.cpp	2005-09-26 13:29:28 UTC (rev 4466)
@@ -144,6 +144,16 @@
 
     CheckValid(enable, !name.IsEmpty(), _("Please specify name."));
     CheckValid(enable, sqlBox->GetLength() > 0, _("Please specify code to execute."));
+
+    // Disable/enable the database combo
+    if ((wxT("sb")[rbxKind->GetSelection()]) == 'b')
+    {
+        cbDatabase->SetSelection(0);
+        cbDatabase->Enable(false);
+    }
+    else
+        cbDatabase->Enable(true);
+
     EnableOK(enable);
 }
 
@@ -172,7 +182,7 @@
         else
             jstjobid = wxT("<JobId>");
 
-        db = qtString(cbDatabase->GetValue());
+        db = qtString(cbDatabase->GetValue().Trim());
 
         sql = wxT("INSERT INTO pgagent.pga_jobstep (jstid, jstjobid, jstname, jstdesc, jstenabled, jstkind, jstonerror, jstcode, jstdbname)\n")
               wxT("SELECT <StpId>, ") + jstjobid + wxT(", ") + qtString(name) + wxT(", ") + qtString(txtComment->GetValue()) + wxT(", ")
@@ -212,7 +222,7 @@
                 vars.Append(wxT(", "));
             
             if (!cbDatabase->GetSelection())
-                vars.Append(wxT("jstdbname=NULL"));
+                vars.Append(wxT("jstdbname=''"));
             else
                 vars.Append(wxT("jstdbname=") + qtString(cbDatabase->GetValue()));
         }


Responses

pgadmin-hackers by date

Next:From: Andreas PflugDate: 2005-09-26 13:38:02
Subject: Re: pgAdmin Translations
Previous:From: Dave PageDate: 2005-09-26 13:18:10
Subject: Re: pgAdmin Translations

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group