Easy steps to PANIC a server
Posted in 1998
Topics: Error Codes & Troubleshooting, Connectivity: ESQL/C, 4GL & Embedded SQL
To all: The following example will get through the pre-processor and compile process without error. Does anybody have a parser which will catch this type of error. If we develop our own, what are the rules of order and scope?? We are compiling 16 bit Windows client code with INFORMIX-EMBEDDED SQL for C Version 5.01.W and VC 5.0 and executing against a 7.24 SUN engine. The following code illustration will cause a server panic. // declaration for a dynamic cursor as advised by Tech Support $char szBuffer[300]; $char dlTs[] = "dlTestSel_qid"; $char dlTc[] = "dlTest_Cursor"; sprintf(szBuffer ,"select ..."); // Prepare the string $prepare $dlTs from $szBuffer; // oops forgot the $ -- using a static cursor $declare dlTc cursor for $dlTs; // still using the static cursor $open dlTc; $fetch dlTc into $dtHolder; $close dlTC; // free the dynamic cursor (which was not declared) $free $dlTc; We do not free the static cursor ( dlTc ). Execute enough times and a panic ensues. Thanks for any help Steve Wallick Software Engineer Harris Publishing Systems Corp steve.wallick@harris.com