Index: generic/tdbcodbc.c
==================================================================
--- generic/tdbcodbc.c
+++ generic/tdbcodbc.c
@@ -2208,17 +2208,18 @@
  *
  *	Private method that informs the code whether the connection supports
  *	64-bit ints.
  *
  * Usage:
- *	$connection HasBigint boolean
+ *	$connection HasBigint ?boolean?
  *
  * Parameters:
- *	boolean - 1 if the connection supports BIGINT, 0 otherwise
+ *	boolean - 1 if the connection supports BIGINT, 0 otherwise,
+ *		  if omitted, return current state
  *
  * Results:
- *	Returns an empty Tcl result.
+ *	Returns an empty Tcl result or boolean current state.
  *
  *-----------------------------------------------------------------------------
  */
 
 static int
@@ -2237,12 +2238,17 @@
     int flag;
     (void)dummy;
 
     /* Check parameters */
 
+    if (objc == 2) {
+	Tcl_SetObjResult(interp, Tcl_NewWideIntObj(
+		(cdata->flags & CONNECTION_FLAG_HAS_BIGINT) ? 1 : 0));
+	return TCL_OK;
+    }
     if (objc != 3) {
-	Tcl_WrongNumArgs(interp, 2, objv, "flag");
+	Tcl_WrongNumArgs(interp, 2, objv, "?flag?");
 	return TCL_ERROR;
     }
     if (Tcl_GetBooleanFromObj(interp, objv[2], &flag) != TCL_OK) {
 	return TCL_ERROR;
     }
@@ -2261,17 +2267,18 @@
  *
  *	Private method that informs the code whether the connection supports
  *	WVARCHAR strings.
  *
  * Usage:
- *	$connection HasWvarchar boolean
+ *	$connection HasWvarchar ?boolean?
  *
  * Parameters:
  *	boolean - 1 if the connection supports WVARCHAR, 0 otherwise
+ *		  if omitted, return current state
  *
  * Results:
- *	Returns an empty Tcl result.
+ *	Returns an empty Tcl result or boolean current state.
  *
  *-----------------------------------------------------------------------------
  */
 
 static int
@@ -2290,12 +2297,17 @@
     int flag;
     (void)dummy;
 
     /* Check parameters */
 
+    if (objc == 2) {
+	Tcl_SetObjResult(interp, Tcl_NewWideIntObj(
+		(cdata->flags & CONNECTION_FLAG_HAS_WVARCHAR) ? 1 : 0));
+	return TCL_OK;
+    }
     if (objc != 3) {
-	Tcl_WrongNumArgs(interp, 2, objv, "flag");
+	Tcl_WrongNumArgs(interp, 2, objv, "?flag?");
 	return TCL_ERROR;
     }
     if (Tcl_GetBooleanFromObj(interp, objv[2], &flag) != TCL_OK) {
 	return TCL_ERROR;
     }

