ColdFusion MX 6.1 and 7: Connecting to MS Access using the jadoZoom JDBC driverProducts affected
Issue
Macromedia ColdFusion MX 6.1 and MX 7 offer two data source types to connect to Microsoft Access databases. They are labeled "Microsoft Access" and "Microsoft Access with Unicode." The Microsoft Access with Unicode type uses the jadoZoom JDBC driver. The jadoZoom driver is often used as an alternative to the standard "Microsoft Access" data source type for connecting to Microsoft Access.
There are several issues to be aware of when using the Microsoft Access with Unicode driver:
- Inserts and updates fail with the error "The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data." This occurs because the data fails to truncate to the maximum column size.
- Booleans must be specified as True or False, whereas 1 or 0 can be used with the Microsoft Access data source type.
- Default values are not automatically inserted to columns.
Reason
Most of the problems described above are avoided by creating jadoZoom data sources using the driver type 'other' rather than using the 'Microsoft Access with Unicode' type. The jadoZoom driver is used to create the 'Microsoft Access with Unicode' data sources as well, but the URL will be different than those described in this article.
Solution
The alternate way to set up the jadoZoom driver is to specify 'other' for the driver rather than "Microsoft Access with Unicode driver." This method requires two separate steps. The first is to create an ODBC data source using the ODBC Administrator in Window's Control Panel. Then, create a data source of type 'other' in the ColdFusion MX Administrator that references the ODBC data source.
- Create an ODBC data source using the Windows ODBC Administrator:
- Open the Windows control panel (Start > Settings > Control Panel).
- Open the ODBC Administrator - ODBC Data Sources (32 bit).
- Select the System DSN tab.
- Click Add to create a new ODBC data source.
- Choose the Microsoft Access driver type and click finish.
- Complete the ODBC DSN setup. If you need assistance creating the data source type, use the Help button.
- Create a ColdFusion data source of type 'other':
- Open the ColdFusion MX Administrator.
- Select Data Sources.
- Add a new data source name and select 'other' as the driver type and click Add.
- Enter
jdbc:izmado:DSNNamefor the JDBC URL. Substitute the ODBC DSN you created in step 1 forDSNName in the URL.
Note: This is case sensitive - Enter
com.inzoom.jdbcado.Driverfor the driver class.
Note: This is case sensitive - The Driver name field should remain blank.
- Enter a valid username and password. The default for Access is username=admin and no password.
- Click Submit to create the data source.
This type of data source has proven a good alternative to the standard "MS Access" data source.
Doc ID
(2d2a7a19)
Last updated
2005-03-15
Products affected
