Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
52 Views

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

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
Highlighted
Beginner
52 Views

Sorry instead of CHARACTER*(*

Sorry instead of CHARACTER*(*) X I pasted CHARACTER*(*) OAUID
0 Kudos
Highlighted
Black Belt
52 Views

Which database is this code

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