Skip to main content

Posts

Luck By Chance

No, no I’m not here to discuss the latest Farhan Akhtar starred film, Luck By Chance . This actually regarding the Best Java forum on earth, JavaRanch where mostly I’m engaged with my post. The forum is very friendly yet professional. Most of the time they have a book promotion, which is usually starts at Monday and ends at Friday, in a same week. This time they gave out the copies of “Eclipse Plugin” in 'IDEs, Version Control and other tools' forum section, they draw 4 lucky posters at randomly, and give out book to them, and this time, I won the book… Now what is the Luck By chance, because when you post only one answer to this forum and still you won, you need to be lucky and after all it’s my day, isn’t it? Many people (Not "really" many , but one) questioned about the correctness of that software, after saw my name who posted only one reply. It’s all your luck and for the matter of fact, I participated in many book promotions earlier, recent one is for 'Apac...

How to fetch NULL data into C-ODBC program?

From last two months I’m working on C-ODBC project, despite my expertise in Java. This was I encountered while development. Problem : C-ODBC API does not provide any function which fetch NULL data without throwing a runtime error. Solution : Need to provide an indicator , which get set when row data contained NULL for that specific column. 1. Define the long typed variable for holding indication about NULL data: SQLINTEGER i_first_name, i_last_name, i_age; // i for indicator 2. Passed this indicator variable to SQLBindCol function: SQLBindCol(hstmt, 1, SQL_C_CHAR, first_name, 100, &i_first_name); SQLBindCol(hstmt, 2, SQL_C_CHAR, last_name, 100, &i_larst_name); SQLBindCol(hstmt, 3, SQL_C_CHAR, age, 100, &i_age); More Information: http://msdn.microsoft.com/en-us/library/ms711010.aspx 3. Check whether we fetched any NULL data into a column by checking, if(i_first_name == SQL_NULL_DATA) { // I put a “null” string into fist_name variable. strcpy(fi...

A CAT crossed my (Life's ??) path !!

Yesterdays, a thousands of young grads appeared for CAT, the MBA entrance for top biz school in India and considered as one of the toughest exam in world! I'm not business or management guy, nor I'm gonna explain u the structure or importance of CAT, either.. While many of my good friends preparing for it from last 2 years, some just waked up with Saturday night hangover and went for the exam. They realized me (or I'm pretend to be realized) the importance of CAT, the MBA n some same stuff for good life. But neither I'm gonna do that for next 5-6 years nor I got that much money... So my technical is good for me... Let’s see what life brings to me (w/o MBA)

com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception

com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.net.SocketException MESSAGE: Software caused connection abort: recv failed STACKTRACE: java.net.SocketException: Software caused connection abort: recv failed Environment: Apache Tomcat 6.0.14 with MySQL 5.2 This is the exception which was the night mare for many developers who used MySQL with Java Web application in Tomcat server. Before explaining the cause let me told you that, the exception has responsible for pulling my hair for almost 2 weeks, with little use of Googling and MySQL Forum! Particularly, the problem was, I lost my connection object when server is idle for 24 to 34 hours, so any request comes after this time interval results in above exception. Disclaimer: The below explanation is as per my understanding and as I’m not an architecture of MySQL JConnector nor Apache DBCP API, Comments & Suggestions are welcomed, See this link from wh...

Hello , Mike Testing..

This is my first (or last, the way blogger stacked them) blog and I`m pretty excited . In this coming years you can expect my thoughts on various technical and non technical issues. I`m not kinda writer person, So your comment are always welcome, So , Take my thoughts ..