pro*C segmentation fault!!!!!!!!

From: kpriya80 <member37703_at_dbforums.com>
Date: Tue, 02 Sep 2003 02:49:11 -0400
Message-ID: <3312338.1062485351_at_dbforums.com>


Hi,

I am using a make file to compile a pro*C program.I am able to compile and generate the executable.However while I am executing the program I am encountering a segmentation fault.It gives this falut on encountering a EXEC SQL statement.The following is a part of the code that is giving this fault.

memset((char*)username.arr, 0x00, 20);

strcpy((char*)username.arr, "user/pwd");

username.len = strlen((char*)username.arr);

fprintf(stdout, "DEBUG=Connect to database\n");

EXEC SQL CONNECT :username;

if (sqlca.sqlcode != OK) {

fprintf(stderr, "\nUnable to connect - sqlca.sqlcode[%d]\n\n", s

qlca.sqlcode);

exit(NOTOK);

}

Can anyone please help me with this?

Priya

--
Posted via http://dbforums.com
Received on Tue Sep 02 2003 - 08:49:11 CEST

Original text of this message