Fixed it. Appears I need to cast it with (SQLCHAR *) SQLGetDiagRec(SQL_HANDLE_STMT, Statement, 1, (SQLCHAR *) errornumber, NULL, (SQLCHAR *) message, sizeof(message), NULL); Works fine now. Guess the compiler is more picky on FC4. Duncan