Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

error #6303: The assignment operation or the binary expression operation is invalid for the data types of the two operands

Madhubalan_R_
Beginner
2,395 Views

Hi All EXEC SQL BEGIN DECLARE SECTION CHARACTER*(*) X EXEC SQL END DECLARE SECTION ...................................... ...................................... When I try to precompile the above code block I am getting INTEGER*8 SQLITR INTEGER*8 SQHSTV(1) INTEGER*8 SQHSTL(1) INTEGER*8 SQINDV(1) ...................................... ...................................... C EXEC SQL BEGIN DECLARE SECTION CHARACTER*(*) OAUID C EXEC SQL END DECLARE SECTION ...................................... ..................................... CALL SQLADR(X, SQHSTV(1)) SQHSTL(1) = (X) SQINDV(1) = 0 SQHARM(1) = 0 ........................................ ........................................ But in compilation it shows **The assignment operation or the binary expression operation is invalid for the data types of the two operands. ** error.Please guide me to solve this issue.

0 Kudos
2 Replies
Madhubalan_R_
Beginner
2,395 Views
Sorry instead of CHARACTER*(*) X I pasted CHARACTER*(*) OAUID
0 Kudos
mecej4
Honored Contributor III
2,395 Views

Which database is this code being used with? Which Fortran compiler is it that is the target of the database Fortran precompiler?

Leaving aside the questions above, there are two problems that I can see. A variable can be declared to be of type CHARACTER*(*) only if the variable is a dummy argument to a function or subroutine within which the declaration is located. Secondly, the line that generated the error message is attempting to set an INTEGER*8 variable equal to an expression of type character. Such mixing of types was permitted in old versions of Fortran, but is not allowed. If you can name and state the version the compiler that used to accept this code, we could try to suggest how to recode the line. The addition of parentheses around X does nothing, so what was the intent of placing them? Many of the old ways of processing lower level information such as variable addresses, which relied on lax checking of variable types, no longer work today.

Have you looked at http://sourceforge.net/projects/f90sql/ ?

0 Kudos
Reply