Professional Web Applications Themes

Best to use ODBC Socket or mysql-connector-java-5.0.3? - Coldfusion Database Access

Hi, There are two ways we can connect to our mySQL (4.x) database (both work). 1) Create a System DSN and then use ODBC Socket in the CFAdmin. 2) Use the mysql-connector-java-5.0.3 directly in CFAdmin. What is the most effecient driver? Thanks...

  1. #1

    Default Best to use ODBC Socket or mysql-connector-java-5.0.3?

    Hi,

    There are two ways we can connect to our mySQL (4.x) database (both work).

    1) Create a System DSN and then use ODBC Socket in the CFAdmin.
    2) Use the mysql-connector-java-5.0.3 directly in CFAdmin.

    What is the most effecient driver?

    Thanks

    Oliver Guest

  2. #2

    Default Re: Best to use ODBC Socket or mysql-connector-java-5.0.3?

    Oliver Cookson wrote: 

    for cf (6 & beyond), JDBC is almost *always* a better choice, especially if you
    need to handle unicode data.
    PaulH Guest

  3. #3

    Default Re: Best to use ODBC Socket ormysql-connector-java-5.0.3?

    Thanks...

    In that case I will move to JDBC but I am having issues with
    "zeroDateTimeBehavior".

    Do you have any idea how I perform the following? I'm not sure where I can
    make these changes?

    # Select the MySQL database connection in the objects tree
    # Select the "Connection" tab and the "Properties" sub tab
    # In the category tree choose "Driver Properties"
    # In the list of properties locate zeroDateTimeBehavior. The following is an
    excerpt from the Connector/J doentation that describes the
    zeroDateTimeBehavior property.

    Oliver Guest

  4. #4

    Default Re: Best to use ODBC Socket or mysql-connector-java-5.0.3?

    Oliver Cookson wrote: 

    nope. can this be added via the JDBC url?
    PaulH Guest

  5. #5

    Default Re: Best to use ODBC Socket or mysql-connector-java-5.0.3?

    you add it to the db url.
    jdbc:mysql://localhost:3307/mydatabase?zeroDateTimeBehavior=yourdesiredvalue
    Valid values are 'exception', 'round' and 'convertToNull'.
    http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-configuration-properties.html

    and just an fyi...if you are using 4.0 you can use the built in mysql
    driver with no problems, but for 4.1+ you'll probably need the mysql J
    connector driver
    HTH
    --
    Tim Carley
    www.recfusion.com
    com
    Mountain Guest

Similar Threads

  1. ODBC Socket doesn't show my list of ODBC DSN's!?!
    By Jon Block in forum Coldfusion Database Access
    Replies: 2
    Last Post: July 22nd, 08:09 PM
  2. mysql-connector-java sadness
    By Walter Vaughan in forum MySQL
    Replies: 3
    Last Post: May 11th, 01:08 PM
  3. Replies: 0
    Last Post: January 29th, 02:03 PM
  4. ODBC Socket
    By spham in forum Coldfusion Database Access
    Replies: 0
    Last Post: December 22nd, 04:35 PM
  5. Having Problems with JDBC to ODBC connector ColdfusionMX7
    By Head Shooter in forum Coldfusion Database Access
    Replies: 0
    Last Post: August 10th, 09:37 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139