木曜日, 1月 17, 2008

Sun Microsystems to buy MySQL

What does it mean for us, for Sun Microsystems to buy MySQL? The answer: BB+.

Sun Microsystems' ratings unaffected by agreed MySQL acquisition - S&P (2008-1-17)

But for MySQL users, it's a blessing. It means (probably) formal driver supports, documentation supports and package distribution under Java JDK.

I use MySQL with a jdbc driver and from Java application, DB access is as easy as ever. Just like Java. Here is how to open a database connection.


Class.forName(driver).newInstance();
connection = DriverManager.getConnection(openDBString+database,user,password);
statement=connection.createStatement();


I say, Java is wonderful. How about this? To browse through the database and print out whatever satisfies the condition, the following does the job.


ResultSet rs = statement.executeQuery("SELECT * FROM "+tableName+condition);
ResultSetMetaData meta = rs.getMetaData();
int nCol=meta.getColumnCount();
while (rs.next())
{
String buf=template;
for(int i=1;i<=nCol;i++)
{
String columnName=meta.getColumnName(i);
System.out.println(columnName,new String(rs.getBytes(i),"UTF8"));
}
}


I say, Java is wonderful.

...

I will declear new and then they must delete it. > obsolete programmers

But it is new you know.

...any problems? ^^

Qt: 外部プログラムを起動する

  Qt/C++ のアプリは、外部へ直接アクセスできます。これはネットアプリでは不可能な Qt のメリットです。 外部プログラムを起動することもできます。QProcess::startDetached() を使うと独立したプロセスを立ち上げることができます。 この QProces...