The program below works with PostgreSQL 8.0.3, but not 8.1.10. The error I receive is:
Runtime Error! Program: C:\testSQL.exe This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. This happens on the "exec sql commit work" line. If I remove the comments, it works with both 8.0.3 and 8.1.10. If I change the comments (add a line, delete a line, etc.) it continues to crash, but sometimes it will crash on the "exec sql begin work" line. The connection works fine -sqlca.sqlcode is 0, sqlca.sqlstate is 0000 and sqlca.sqlwarn is blank I am running on WindowsXP and compiling with Visual C++ 6.0. I ran ecpg versions 8.0.3 and 8.1.10 on the file, then compared the created .c files. According to KDiff, the files are identical, except for the first comment line saying which version of ecpg was used. Here's the testSQL.pgc code: /* add a comment */ /* and another */ /* one more */ main (int argc, char **argv) { printf ("connect\n"); exec sql connect to mdllt_db as mdllt_cnxtn; printf ("connection results:\n"); printf ("code: %d\n", sqlca.sqlcode); printf ("state: %s\n", sqlca.sqlstate); printf ("warn: %s\n", sqlca.sqlwarn); exec sql begin work; printf ("begin results:\n"); printf ("code: %d\n", sqlca.sqlcode); printf ("state: %s\n", sqlca.sqlstate); printf ("warn: %s\n", sqlca.sqlwarn); exec sql commit work; printf ("end\n"); return 0; } Thanks for any help. -Cheryl