Linking my code to MySQL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hsn
    New Member
    • Sep 2007
    • 237

    #1

    Linking my code to MySQL

    i have a problem when linking my java code to mySQL
    thow i tryed more than 4 ways that was found on the net
    (My mySQL server version: 5.0.45)
    connection id 5
  • mwasif
    Recognized Expert Contributor
    • Jul 2006
    • 802

    #2
    How you are connecting to MySQL? Did you try this?

    Comment

    • pbmods
      Recognized Expert Expert
      • Apr 2007
      • 5821

      #3
      Moving to the Java forum.

      Comment

      • heat84
        New Member
        • Nov 2007
        • 118

        #4
        Originally posted by hsn
        i have a problem when linking my java code to mySQL
        thow i tryed more than 4 ways that was found on the net
        (My mySQL server version: 5.0.45)
        connection id 5

        Are you using ODBC or not? What is the error then if your code is giving errors , if not , how do you deduce that its not connecting. Perhaps the finer details are relevant.

        Comment

        • BigDaddyLH
          Recognized Expert Top Contributor
          • Dec 2007
          • 1216

          #5
          Originally posted by heat84
          Are you using ODBC or not? What is the error then if your code is giving errors , if not , how do you deduce that its not connecting. Perhaps the finer details are relevant.
          Why is everyone bringing the ODBC up?? The OP mentioned his database is MySQL, and he never wrote ODBC, nor does he need to use it.

          What he needs to do is be more specific, here. It's not hard to connect to a database in Java.

          Comment

          • heat84
            New Member
            • Nov 2007
            • 118

            #6
            Originally posted by BigDaddyLH
            Why is everyone bringing the ODBC up?? The OP mentioned his database is MySQL, and he never wrote ODBC, nor does he need to use it.

            What he needs to do is be more specific, here. It's not hard to connect to a database in Java.
            Perhaps the dude may have used ODBC and he may have omitted adding the data source name and all.

            However , the bottom line is that for clarirty's sake, the experts and fellow members need the finer details

            Comment

            • BigDaddyLH
              Recognized Expert Top Contributor
              • Dec 2007
              • 1216

              #7
              Originally posted by heat84
              Perhaps the dude may have used ODBC and he may have omitted adding the data source name and all.

              However , the bottom line is that for clarirty's sake, the experts and fellow members need the finer details
              Yes, don't mention ODBC. Here is the home page for Connector/J documentation:

              http://dev.mysql.com/doc/refman/5.0/en/connector-j.html

              Connector/J is what needs to be mentioned. It is MySQL's JDBC driver.

              Comment

              Working...