Hi! I am trying to connect MySQL Database to COBOL. I have made it possible to some stages by the way as follows; I have developed this under; Client: Microsoft Windows 2000 Service pack 4. CA-Realia COBOL Compiler Version 6.0.45 Microsoft (R) Incremental Linker Version 6.00.8168 MySQL server 4.0.17-max in SUSE Linux,
MySQL provides set of C API to interact with MySQL database, to link the functions to the compiler it provides a library file "libmysql.lib". COBOL has the External subroutine featurs to CALL the program written in other languages. When I try to link existing libmysql.lib file directly to the COBOL compiler it won’t recognize it. So I have prepared a COBOL compiler specific library file from the corresponding libmysql.dll file, in such a way. (The libmysql.dll I have used to create COBOL compiler specific libmysql.lib is gathered from Mysql 4.0.17-max-debug for windows, in my localhost) The COBOL compiler specific libmysql.lib is linked successfully to the COBOL Compiler and I have written some subroutine call to the function related to database connection from COBOL. Such that mysql_init, mysql_real_connect, mysql_real_query, mysql_error and mysql_close. Here mysql_init requires a Null pointer argument and return the MySQL handle back. mysql_real_connect use that MySQL handle with additional arguments host name, userid, password, DB name, port number, socket and flag to establish connection to the specified database. In my case mysql_init return a handle to mysql_real_connect, but instead of connection establishment to MySQL it shows runtime error in COBOL as RDB0104E: Interrupt trapped: Illegal storage access. And store an error message in variable’s memory space as; Unknown MySQL Server host So I want to have suggestion regarding the following; 1. ‘Unknwon MySQL server host’ means it could not able to recognize the particular Host what I have mentioned or anything else? 2. For the socket parameter in mysql_real_connect I have passed NULL value. Is it correct? 3. I have prepared the COBOL compiler specific libmysql.lib from libmysql.dll which I have taken from Windows as per the suggestions read from MySQL documentation. – is this correct? 4. From my client machine i.e., windows platform I can able to connect to MySQL by writing simple C program using that C APIs. Then why it does not work with COBOL? Thanks , any suggestion or help would be greatly appreciated. Arun. ________________________________________________________________________ Yahoo! India Mobile: Download the latest polyphonic ringtones. Go to http://in.mobile.yahoo.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]