Entries Tagged as 'Databases'

Using JDBC to connect to Microsoft Access database

I'm doing a training tomorrow for which I needed to use a demo Microsoft Access database. However, my laptop does not have ColdFusionMX 7 ODBC Server and ODBC Agent installed as Windows services. So, each time I try to setup a Microsoft Access datasource, I get a message:

The ColdFusion MX 7 ODBC Server service is not running or has not been installed. You may also use the "MS Access with Unicode" driver to connect to MS Access datasources.

As I didn't feel like manually installing the ODBC agent and server, I wondered if there was a way to simply use JDBC to connect directly to the Access database. And there is.In ColdFusion Administrator, create a datasource of the type "other". And use the following settings subsequently:

Read more...

Running MySQL 5 as MySQL 4

I use MySQL 5 as the default database for the work that I usually do. Today I came across a situation where I needed to test some MySQL 4 functionality. An option was to install MySQL 4 on another port (not the standard 3306). However, an easier option is to simply switch the MySQL mode.

/* show the current sql mode */

SELECT @@GLOBAL.sql_mode;



/* change the settings to mysql 4 mode */

/* the 'GLOBAL' keyword changes the mode for all clients that connect from that time on */



SET GLOBAL sql_mode = 'NO_FIELD_OPTIONS,HIGH_NOT_PRECEDENCE';

More information can be found at: http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html

Installing Apache Derby Database on ColdFusionMX 7.0.2

I recently re-discovered Apache Derby, a Java-based database that seems like a promising alternative to MySQL. I downloaded it a few months back but for some reason or the other never persisted with it. Anyway, this time around there were other factors so I went through the motions of understanding how it works and setting it up.

Read more...