Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re:Can Pro*C use long datatypes in 8.1.5?
Cherie,
This is a rather simple error. They're passing 'error_number' in as a long int, but then trying to place that into the 'verror_number' variable that is declared as a simple int. Otherwise this looks fine.
Dick Goulet
OLD PRO*C hacker
____________________Reply Separator____________________ Author: Cherie_Machler_at_gelco.com Date: 2/2/2001 7:20 AM
We are migrating some 7.3.4 databases to 8.1.5. I thought that long datatypes were desupported in 8.1.5.
Our developers are having trouble with some of their code that does uploads and downloads. I really don't know much about Pro*C but see several uses of long datatypes in their package.
Can someone tell me whether this Pro*C function call will still work within 8.1.5?
int DATABASE_SYSMSG_Write (char type, long error_number, char *error_msg,
char *location, char *s1, char *s2, char *s3, char *s4, char *s5, char *s6){
int ret = 0;
/* If the arguments include null pointers, set them to something so segmentation violation won't occur. */ if (! s1) s1 = " "; if (! s2) s2 = " "; if (! s3) s3 = " "; if (! s4) s4 = " "; if (! s5) s5 = " "; if (! s6) s6 = " "; EXEC SQL BEGIN DECLARE SECTION; VARCHAR vtype[2]; int verror_number; VARCHAR verror_msg[81]; char *vlocation; int vsql_error; VARCHAR vsql_msg[81]; VARCHAR vs1[81]; VARCHAR vs2[81]; VARCHAR vs3[81]; VARCHAR vs4[81]; VARCHAR vs5[81]; VARCHAR vs6[81];
vs1.len = sprintf ((char *)vs1.arr, "%s", s1); vs2.len = sprintf ((char *)vs2.arr, "%s", s2); vs3.len = sprintf ((char *)vs3.arr, "%s", s3); vs4.len = sprintf ((char *)vs4.arr, "%s", s4); vs5.len = sprintf ((char *)vs5.arr, "%s", s5); vs6.len = sprintf ((char *)vs6.arr, "%s", s6); EXEC SQL EXECUTE BEGIN Help_DeskPackage.AddBackendRecord (:vtype, :verror_number, :vsql_msg,END;
:vsql_error, :vlocation, :verror_msg,
:vs1, :vs2, :vs3, :vs4, :vs5, :vs6);
{ ret = -1; }
return (ret);
}
Thanks,
Cherie Machler
Gelco Information Network
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: Cherie_Machler_at_gelco.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: dgoulet_at_vicr.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Fri Feb 02 2001 - 11:08:47 CST