Skip to content

Commit d00bffe

Browse files
authored
- Fix funciones time/connection/version etc de serverside hana. Issue 83391 (#653)
1 parent c363b38 commit d00bffe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

java/src/main/java/com/genexus/db/driver/GXDBMShana.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public void onConnection(GXConnection con) throws SQLException
130130

131131
public java.util.Date serverDateTime(GXConnection con) throws SQLException
132132
{
133-
ResultSet rslt = con.getStatement("_ServerDT_", "SELECT NOW()", false).executeQuery();
133+
ResultSet rslt = con.getStatement("_ServerDT_", "SELECT CURRENT_TIMESTAMP FROM DUMMY", false).executeQuery();
134134

135135
rslt.next();
136136
Date value = rslt.getTimestamp(1);
@@ -141,7 +141,7 @@ public java.util.Date serverDateTime(GXConnection con) throws SQLException
141141

142142
public String serverVersion(GXConnection con) throws SQLException
143143
{
144-
ResultSet rslt = con.getStatement("_ServerVERSION_", "SELECT VERSION()", false).executeQuery();
144+
ResultSet rslt = con.getStatement("_ServerVERSION_", "SELECT VERSION FROM M_DATABASE", false).executeQuery();
145145

146146
rslt.next();
147147
String value = rslt.getString(1);
@@ -154,7 +154,7 @@ public String connectionPhysicalId(GXConnection con)
154154
{
155155
try
156156
{
157-
ResultSet rslt = con.getStatement("_ConnectionID_", "SELECT CONNECTION_ID()", false).executeQuery();
157+
ResultSet rslt = con.getStatement("_ConnectionID_", "SELECT CURRENT_CONNECTION FROM DUMMY", false).executeQuery();
158158

159159
rslt.next();
160160
String value = rslt.getString(1);

0 commit comments

Comments
 (0)