ColdFusion Day 30:

================

 

FINDING ADDITIONAL REFERENCES FOR THE VARIOUS DATABASES   

 

There is much more to learn about the various databases that you will be using for your ColdFusion applications. The best place to start is the FREE Coldfusion Support Forum located at:

 

    http://forums.allaire.com/devconf/

 

You can post your questions and concerns and you can also search for certain topics that interest you. The forum is divided into scopes, or topics. For topics covered in this chapter, check out the "Database Access and Query Building" scope.

 

ColdFusion's Web site also has a section called the Knowledge Base. It is a compilation of topics that include problem discussion and analysis and workarounds. It is located at:

 

    http://www1.allaire.com/support/knowledgeBase/SearchForm.cfm

 

Some knowledge base articles relevant to this chapter are:

 

    *    Article 7606, "Connecting with Oracle 7.3 Native Driver".

    *    Article 1114, "Optimizing ColdFusion Queries".

    *    Article 580, "Using ColdFusion with Oracle".

    *    Article 564, "Microsoft Access ODBC Driver Performance Enhancement Setting".

    *    Article 255, "The use of Single Quotes in CFQUERY".

 

Here are some other references:

 

    *    ODBC reference in ODBC Software Developers Kit (SDK) at http://www.microsoft.com/data/odbc

 

    *    Oracle ODBC drivers can be found at their FTP site. (The Oracle ODBC drivers come bundled with a test tool. This is an excellent tool for testing ODBC connections, for testing your SQL statements, and for instantly viewing the results of your query). The sites are as follows:

 

            *    For Oracle 7.x ftp://ftp.oracle.com/pub/www/odbc_07/

            *    For Oracle 7.x ftp://ftp.oracle.com/pub/www/odbc_08/

 

    *    Sybase Transaction SQL performance tips at:

 

            http://www.sybase.com/products/whitepaper/performance_tips.html

 

TROUBLESHOOTING COMMON ODBC ERRORS

 

The following are some common ODBC errors encountered while developing ColdFusion Applications:

 

    *    ODBC Error Code = 07001 (Wrong number of parameters) [Microsoft] [ODBC Microsoft Access 97 Driver] Too few parameters expected.

 

This error can be due to improper use of the quotes within your SQL statement.

 

NOTE    See the "Single Quotes in CFQUERY" section earlier in this chapter for details on the proper use of quotes in SQL.

 

    *    ODBC Error Code = IM002, IM003 or IM004

 

These types of errors are usually related to path issues or mismatched versions of database client files.

 

NOTE    See Knowledge Base Article 6564 at http://www.allaire.com/support/KnowledgeBase/SearchForm.cfm for more information on path issues and mismatched database client files.

 

    *    ODBC Error Code = S1011 (Operation invalid at this time)

 

If you have ColdFusion 4, this ODBC error shows up for the CFTRANSACTION tag where the database isolation level is always being set to Read_Committed even if this attribute is not set in the tag. This error does not occur in the 3.1 release and has been fixed for the 4.01 release.

 

    *    ODBC Error Code = 37000 (Syntax error or access violation) [Microsoft] [ODBC Microsoft Access 97 Driver] Syntax error (missing operator) in query expression.

 

This error is a general syntax error. Be sure to check the syntax of your SQL query. It may mean that you have an extra comma, a missing comma, an extra quote, or a missing quote.

 

NOTE    See the "Single Quotes in CFQUERY"section earlier in this chapter for details on the use of quotation marks in SQL.

 

    *    ODBC Error Code = 23000 (Integrity constraint violation)

 

This error indicates that you are trying to insert or update an index or primary key by using a duplicate value already listed in the table.

 

Back   Next