To Enable SQLite at ColdFusion8

I want to write a note about how to enable SQLite at ColdFusion8 using JDBC Driver.

  1. Download the SQLite JDBC Driver
  2. Unzip it and get sqlite_ini.dll and sqlite.jar. Place them individually like followings:
    sqlite_ini.dll => {CFroot}/runtime/jre/bin/
    sqlite.jar => {CFroot}/wwwroot/WEB-INF/lib/
  3. Log in to CF Administrator and go to JAVA & JVM, then add ColdFusion Classpass:
    {CFroot}/wwwroot/WEB-INF/lib/sqlite.jar
  4. Restart ColdFusion 8 Application Server
  5. Log in to CF Administrator again and go to Datasource, then create a new datasource with database driver : other
  6. Setting is:
    JDBC URL => jdbc:sqlite:/Full Path of the SQLite database
    c.f) jdbc:sqlite:/C:/Development/test.sql
    Driver Class => SQLite.JDBCDriver
  7. Send and you would see the connection-status

Labels of resultsets has table names of SQLite database. So, souce codes should be followings:


<cfquery name="userNames" datasource="testUsers">
SELECT id, name
FROM users
</cfquery>
<cfoutput query="userNames">
#userNames.users.id# #userNames.users.name#<br />
</cfoutput>

ColdFusion & SQLite – ColdFusion Talk
http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:48155

Message posted by Suzor – smithproject.org
http://www.smithproject.org/forum/posts/listByUser/16.page

  AddClips   人気blogランキング  BS blog ranking  

Tags: , , ,

Leave a Reply