 : alloc-stmt-handle ( dbc -- handle )
   SQL-HANDLE-STMT swap alloc-handle ;
 
+<PRIVATE
+
+: alien-space-str ( len -- alien )
+    CHAR: space <string> ascii string>alien ;
+
+PRIVATE>
+
 : temp-string ( length -- byte-array length )
-  [ CHAR: space <string> ascii string>alien ] keep ;
+  [ alien-space-str ] keep ;
 
 : odbc-init ( -- env )
   alloc-env-handle


:: odbc-describe-column ( statement columnNumber -- column )
  1024 :> bufferLen
  bufferLen CHAR: space <string> ascii string>alien :> columnName
  0 short <ref> :> nameLengthPtr
  0 short <ref> :> dataTypePtr
  0 uint <ref> :> columnSizePtr

:: odbc-get-field ( statement column! -- field )
  column column? [ statement column odbc-describe-column column! ] unless
  8192 :> bufferLen
  bufferLen alien-space-str :> targetValuePtr
  statement column number>> SQL-C-DEFAULT
  targetValuePtr bufferLen f SQLGetData succeeded? [
      targetValuePtr column [ dereference-type-pointer ] keep <field>
