3434#include <sqlext.h>
3535#endif
3636
37- /* Bind parameters on a statement handle */
37+ // Bind parameters on a statement handle
3838
3939RETCODE SQL_API SQLBindParameter (
4040HSTMT hstmt ,
@@ -75,18 +75,18 @@ static char *func="SQLBindParameter";
7575
7676stmt -> parameters_allocated = ipar ;
7777
78- /* copy the old parameters over */
78+ // copy the old parameters over
7979for (i = 0 ;i < old_parameters_allocated ;i ++ ) {
80- /* a structure copy should work */
80+ // a structure copy should work
8181stmt -> parameters [i ]= old_parameters [i ];
8282}
8383
84- /* get rid of the old parameters, if there were any */
84+ // get rid of the old parameters, if there were any
8585if (old_parameters )
8686free (old_parameters );
8787
88- /* zero out the newly allocated parameters (in case they skipped some, */
89- /* so we don't accidentally try to use them later) */
88+ // zero out the newly allocated parameters (in case they skipped some,
89+ // so we don't accidentally try to use them later)
9090for (;i < stmt -> parameters_allocated ;i ++ ) {
9191stmt -> parameters [i ].buflen = 0 ;
9292stmt -> parameters [i ].buffer = 0 ;
@@ -105,7 +105,7 @@ static char *func="SQLBindParameter";
105105
106106ipar -- ;/* use zero based column numbers for the below part */
107107
108- /* store the given info */
108+ // store the given info
109109stmt -> parameters [ipar ].buflen = cbValueMax ;
110110stmt -> parameters [ipar ].buffer = rgbValue ;
111111stmt -> parameters [ipar ].used = pcbValue ;
@@ -140,9 +140,9 @@ static char *func="SQLBindParameter";
140140return SQL_SUCCESS ;
141141}
142142
143- /* - - - - - - - - - */
143+ // - - - - - - - - -
144144
145- /* Associate a user-supplied buffer with a database column. */
145+ // Associate a user-supplied buffer with a database column.
146146RETCODE SQL_API SQLBindCol (
147147HSTMT hstmt ,
148148UWORD icol ,
@@ -195,14 +195,14 @@ mylog("**** SQLBindCol: stmt = %u, icol = %d\n", stmt, icol);
195195return SQL_SUCCESS ;
196196}
197197
198- /* allocate enough bindings if not already done */
199- /* Most likely, execution of a statement would have setup the */
200- /* necessary bindings. But some apps call BindCol before any */
201- /* statement is executed. */
198+ // allocate enough bindings if not already done
199+ // Most likely, execution of a statement would have setup the
200+ // necessary bindings. But some apps call BindCol before any
201+ // statement is executed.
202202if (icol > stmt -> bindings_allocated )
203203extend_bindings (stmt ,icol );
204204
205- /* check to see if the bindings were allocated */
205+ // check to see if the bindings were allocated
206206if ( !stmt -> bindings ) {
207207stmt -> errormsg = "Could not allocate memory for bindings." ;
208208stmt -> errornumber = STMT_NO_MEMORY_ERROR ;
@@ -234,14 +234,14 @@ mylog("**** SQLBindCol: stmt = %u, icol = %d\n", stmt, icol);
234234return SQL_SUCCESS ;
235235}
236236
237- /* - - - - - - - - - */
237+ // - - - - - - - - -
238238
239- /* Returns the description of a parameter marker. */
240- /* This function is listed as not being supported by SQLGetFunctions() because it is */
241- /* used to describe "parameter markers" (not bound parameters), in which case, */
242- /* the dbms should return info on the markers. Since Postgres doesn't support that, */
243- /* it is best to say this function is not supported and let the application assume a */
244- /* data type (most likely varchar). */
239+ // Returns the description of a parameter marker.
240+ // This function is listed as not being supported by SQLGetFunctions() because it is
241+ // used to describe "parameter markers" (not bound parameters), in which case,
242+ // the dbms should return info on the markers. Since Postgres doesn't support that,
243+ // it is best to say this function is not supported and let the application assume a
244+ // data type (most likely varchar).
245245
246246RETCODE SQL_API SQLDescribeParam (
247247HSTMT hstmt ,
@@ -270,8 +270,8 @@ static char *func = "SQLDescribeParam";
270270
271271ipar -- ;
272272
273- /* This implementation is not very good, since it is supposed to describe */
274- /* parameter markers, not bound parameters. */
273+ // This implementation is not very good, since it is supposed to describe
274+ // parameter markers, not bound parameters.
275275if (pfSqlType )
276276* pfSqlType = stmt -> parameters [ipar ].SQLType ;
277277
@@ -287,9 +287,9 @@ static char *func = "SQLDescribeParam";
287287return SQL_SUCCESS ;
288288}
289289
290- /* - - - - - - - - - */
290+ // - - - - - - - - -
291291
292- /* Sets multiple values (arrays) for the set of parameter markers. */
292+ // Sets multiple values (arrays) for the set of parameter markers.
293293
294294RETCODE SQL_API SQLParamOptions (
295295HSTMT hstmt ,
@@ -304,15 +304,15 @@ static char *func = "SQLParamOptions";
304304return SQL_ERROR ;
305305}
306306
307- /* - - - - - - - - - */
307+ // - - - - - - - - -
308308
309- /* This function should really talk to the dbms to determine the number of */
310- /* "parameter markers" (not bound parameters) in the statement. But, since */
311- /* Postgres doesn't support that, the driver should just count the number of markers */
312- /* and return that. The reason the driver just can't say this function is unsupported */
313- /* like it does for SQLDescribeParam is that some applications don't care and try */
314- /* to call it anyway. */
315- /* If the statement does not have parameters, it should just return 0. */
309+ // This function should really talk to the dbms to determine the number of
310+ // "parameter markers" (not bound parameters) in the statement. But, since
311+ // Postgres doesn't support that, the driver should just count the number of markers
312+ // and return that. The reason the driver just can't say this function is unsupported
313+ // like it does for SQLDescribeParam is that some applications don't care and try
314+ // to call it anyway.
315+ // If the statement does not have parameters, it should just return 0.
316316RETCODE SQL_API SQLNumParams (
317317HSTMT hstmt ,
318318SWORD FAR * pcpar )
@@ -338,7 +338,7 @@ static char *func = "SQLNumParams";
338338
339339
340340if (!stmt -> statement ) {
341- /* no statement has been allocated */
341+ // no statement has been allocated
342342stmt -> errormsg = "SQLNumParams called with no statement ready." ;
343343stmt -> errornumber = STMT_SEQUENCE_ERROR ;
344344SC_log_error (func ,"" ,stmt );
@@ -419,13 +419,13 @@ mylog("%s: entering ... stmt=%u, bindings_allocated=%d, num_columns=%d\n", func,
419419stmt -> bindings_allocated = num_columns ;
420420
421421 }
422- /* There is no reason to zero out extra bindings if there are */
423- /* more than needed. If an app has allocated extra bindings, */
424- /* let it worry about it by unbinding those columns. */
422+ // There is no reason to zero out extra bindings if there are
423+ // more than needed. If an app has allocated extra bindings,
424+ // let it worry about it by unbinding those columns.
425425
426- /* SQLBindCol(1..) ... SQLBindCol(10...)# got 10 bindings */
427- /* SQLExecDirect(...) # returns 5 cols */
428- /* SQLExecDirect(...)# returns 10 cols (now OK) */
426+ // SQLBindCol(1..) ... SQLBindCol(10...)# got 10 bindings
427+ // SQLExecDirect(...) # returns 5 cols
428+ // SQLExecDirect(...)# returns 10 cols (now OK)
429429
430430mylog ("exit extend_bindings\n" );
431431}