LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  MySQL & JDBC Query

    Employee
    Posted 02-01-2011 14:23

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: dwong80

    Can somebody provide me a sample of what would normally be put into the parameters fields for JDBC query to a MySQL database for the following:

    - SqlQueryFieldBindings
    - DbURL
    - DbDriver


  • 2.  RE: MySQL & JDBC Query

    Employee
    Posted 02-05-2011 09:46

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: rboccuzzi

    The format of the DbUrl and DbDriver parameters are definitely completely dependent on the driver being used, and there could be more than one driver for a given db, such as SQL Server. There are some examples given in the help for the JDBC Query node, which I have quoted below:

    			
    				For Microsoft's SQL Server 2000 JDBC driver, the URL is jdbc:microsoft:sqlserver://sql_server_machine_name.

    Note that driver vendors often change their URLs from version to version, so always double-check the documentation for the correct syntax (e.g. the URL for Microsoft's SQL Server 2005 JDBC driver is jdbc:sqlserver://sql_server_machine_name).

    For Microsoft's SQL Server 2000 JDBC driver, the URL is com.microsoft.jdbc.sqlserver.SQLServerDriver. Note that driver vendors often change their driver string from version to version, so always double-check the documentation for the correct syntax (e.g. Microsoft's SQL Server 2005 JDBC driver is com.microsoft.sqlserver.jdbc.SQLServerDriver).
    As for the bindings parameter, that will be a list of fields that you have on your input that you would be using in your sql string. For each place that a "?" appears in your sql, you will want a field in this parameter, and they will be substituted in order.

    Cheers
    Rich