Skip to content

Commit

Permalink
Update to new ODBC types SQLLEN and SQLULEN to fix issue MapServer#5172
Browse files Browse the repository at this point in the history
  • Loading branch information
geographika committed Mar 8, 2016
1 parent 6acfaf4 commit 075519a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions mapmssql2008.c
Expand Up @@ -420,7 +420,7 @@ void setMSSQL2008LayerInfo(layerObj *layer, msMSSQL2008LayerInfo *MSSQL2008layer
void handleSQLError(layerObj *layer)
{
SQLCHAR SqlState[6], Msg[SQL_MAX_MESSAGE_LENGTH];
SQLINTEGER NativeError;
SQLLEN NativeError;
SQLSMALLINT i, MsgLen;
SQLRETURN rc;
msMSSQL2008LayerInfo *layerinfo = getMSSQL2008LayerInfo(layer);
Expand Down Expand Up @@ -609,7 +609,7 @@ static int columnName(msODBCconn *conn, int index, char *buffer, int bufferLengt
SQLCHAR columnName[SQL_COLUMN_NAME_MAX_LENGTH + 1];
SQLSMALLINT columnNameLen;
SQLSMALLINT dataType;
SQLUINTEGER columnSize;
SQLULEN columnSize;
SQLSMALLINT decimalDigits;
SQLSMALLINT nullable;

Expand Down Expand Up @@ -1578,8 +1578,8 @@ int msMSSQL2008LayerGetShapeRandom(layerObj *layer, shapeObj *shape, long *recor
{
msMSSQL2008LayerInfo *layerinfo;
int result;
SQLINTEGER needLen = 0;
SQLINTEGER retLen = 0;
SQLLEN needLen = 0;
SQLLEN retLen = 0;
char dummyBuffer[1];
char *wkbBuffer;
char *valueBuffer;
Expand All @@ -1606,7 +1606,7 @@ int msMSSQL2008LayerGetShapeRandom(layerObj *layer, shapeObj *shape, long *recor
shape->type = MS_SHAPE_NULL;

while(shape->type == MS_SHAPE_NULL) {
/* SQLRETURN rc = SQLFetchScroll(layerinfo->conn->hstmt, SQL_FETCH_ABSOLUTE, (SQLINTEGER) (*record) + 1); */
/* SQLRETURN rc = SQLFetchScroll(layerinfo->conn->hstmt, SQL_FETCH_ABSOLUTE, (SQLLEN) (*record) + 1); */

/* We only do forward fetches. the parameter 'record' is ignored, but is incremented */
SQLRETURN rc = SQLFetch(layerinfo->conn->hstmt);
Expand Down Expand Up @@ -2038,7 +2038,7 @@ int msMSSQL2008LayerRetrievePK(layerObj *layer, char **urid_name, char* table_na

{
char buff[100];
SQLINTEGER retLen;
SQLLEN retLen;
rc = SQLGetData(layerinfo->conn->hstmt, 1, SQL_C_BINARY, buff, sizeof(buff), &retLen);

rc = SQLFetch(layerinfo->conn->hstmt);
Expand Down

0 comments on commit 075519a

Please sign in to comment.