Tuesday, August 28, 2007
Yesterday including today was a bad day for me. I was coming back home from office. It was about 8pm. I was crossing dhanmondi 27 after shatmasjid road. Suddenly or slowly a rickshaw came and blocked mine. Then as usual wanted money and told me not to shout. They took my mobile but returned the sim on my request. But they took all money in my moneybag except 13 tk and paisas. This was my first experience. I think not the last.
The story is not over yet. I came home and ate and started to dream. And when i woke up in the morning i found my baranda empty which was full of clothes at night. Good morning robbery.
So it was a bad day for me. I don't know what will happen next. Man, Be careful in the streets.
Monday, August 20, 2007

I am bad mostly
they say that some parts are good
but i think that i didn't tell the truth always ,tried
to prove myself good, which actually was not :)
Extroversion:
You have medium extroversion.
You're not the life of the party, but you do show up for the party.
Sometimes you are full of energy and open to new social experiences.
But you also need to hibernate and enjoy your "down time."
Conscientiousness:
You have low conscientiousness.
Impulsive and off the wall, you don't take life too seriously.
Unfortunately, you sometimes end up regretting your snap decisions.
Overall, you tend to lack focus, and it's difficult for you to get important things done.
Agreeableness:
You have high agreeableness.
You are easy to get along with, and you value harmony highly.
Helpful and generous, you are willing to compromise with almost anyone.
You give people the benefit of the doubt and don't mind giving someone a second chance.
Neuroticism:
You have high neuroticism.
It's easy for you to feel shaken, worried, or depressed.
You often worry, and your worries prevent you from living life fully.
You tend to be emotionally reactive and moody. Your either flying very high or feeling very low.
Openness to experience:
Your openness to new experiences is medium.
You are generally broad minded when it come to new things.
But if something crosses a moral line, there's no way you'll approve of it.
You are suspicious of anything too wacky, though you do still consider creativity a virtue.
You can try to here
Sunday, July 22, 2007
First add a data grid view to the form
then go to the code file
on a buttons click event add the following code
U need to add the header named
using System.Data.OleDb;
private void button1_Click(object sender, EventArgs e)
{
OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\test.mdb;Jet OLEDB:Database Password=password");;
String queryString ="select UserID from UserTable where USerID > 2";
OleDbDataAdapter da = new OleDbDataAdapter(queryString, conn);
DataSet ds = new DataSet();
da.Fill(ds, "UserTable");
dataGridView1.DataSource = ds.Tables["UserTable"].DefaultView;
}
that's it. U r done. U can now add your custom query and use the data grid to show your results.
Enough for today. :D
Some links
http://www.codeproject.com/csharp/UsingDataGrid.asp
http://www.google.com/search?q=c%23+show+data+in+a+datagrid&btnG=Search&hl=en
http://www.c-sharpcorner.com/UploadFile/mahesh/DataGrid11282005234057PM/DataGrid.aspx
Friday, July 20, 2007
i made the decision let's see is it right or wrong
Saturday, July 7, 2007
I am living at my brother's place for one week, but it seemed that I have left the hall for a long time, time goes slow here, last Friday I came to this place. Bought a freeze today :). All my salary is gone . Let's see what happens next. Am a bit tensed about some decisions. Gotta go
Saturday, June 23, 2007
Recently i came to know a tremendous thing of J2ME. I worked little on J2ME. I wanted to make a scrollable textbox which can be appended to a form. So i searched then net and came to know a great thing named Custom Item. This is such an item which you build by yourself and you can add this item to a form. This items have their own paint() method. So you can customize it's look and feel too. The limitation is you can only use it in MIDP 2.0 profiled devices. But it's nice to make one of your own :D. I think J2ME polish uses custom items to change the look and feel of their items.
This links are just great. You can see if u want to learn Custom Item
http://www.ibm.com/developerworks/wireless/library/wi-developui/
http://developers.sun.com/mobility/midp/ttips/customitem/
http://www.google.com/search?hl=en&q=j2me+custom+item&btnG=Google+Search
I was trying to connect to an ms access database using JDBC. Am a bad learner so it took a lot of time for me to finish it. After googling i found some code to work with java and access. Some of the code is shown below
import java.sql.*;
try {
System.out.println("Begining conn");
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String filename = "c:/nsu.mdb";
String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=";
database+= filename.trim() + ";PWD=test}"; // add on to the end
// now we can get the connection from the DriverManager
Connection con = DriverManager.getConnection( database ,"shimul","test");
Statement stmt = con.createStatement();
System.out.println("Conn done succesfully");
stmt.execute("select * from t");
ResultSet rs = stmt.getResultSet(); // get any Resultt that came from our query
if (rs != null)
while ( rs.next() ){
System.out.println("Name: " + rs.getString("a") + " ID: "+rs.getString("b"));
}
stmt.close();
con.close();
}
catch (Exception err) {
System.out.println("ERROR: " + err);
}
But i got some error like
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Record(s) cannot be read; no read permission on 't'.
I tried googling but found few result, after a lot of googling i came to know some solutions which was near to this then finally got the solution
First open the file in access, give password, then From Tool->Security-> User and Group Permissions -> then select the table and for the admin account give it all kind of access. This will solve your access problems.
You can use the above code by changing the statements for insertion deletion update etc. You might have to change the stmt.execute accordingly. Jdbc driver may be required which can be downloaded from sun.java.com . I dont know but mine was already there, new versions of JDK have built in jdbc:odbc support.

