Re: JDBC/mysql error...



Roedy Green wrote:
On Mon, 24 Sep 2007 23:44:24 -0700, thushianthan15@xxxxxxxxx wrote,
quoted or indirectly quoted someone who said :

I got an error, when i tried to connect mysql with java. Any
suggestions ?



see the sample code at http://mindprod.com/jgloss/jdbc.html#CONNECTING


That was helpful to me - after failing to "upsize" my older Access database to SQL Server I decided to connect to the Access DB via jdbc-odbc. I did have to change one line of code in the example that was causing me a problem.


An excerpt from your page shows:


private static final String URL = "jdbc:odbc:";

<snip>

private static String getConnectionUrl()
{
return URL + ":" + DATABASENAME;
}



The ":" needs to be removed from the concatenation. I'm fairly new to Java so it took me a while to discover why my connection kept failing.
Thought you'd like to know.

Thanks for all your advice to this group.

AL

.



Relevant Pages

  • Re: type conversion failure
    ... What types of numeric values are failing (ACCESS creates an error ... > table that tells you the row number in the EXCEL sheet that failed)? ... >>I am impoting a excel spreadsheet into my access database as a new table. ...
    (microsoft.public.access.externaldata)
  • Re: Recommendation for tools converting access databases to SQL
    ... We have several Access database that we would over time plan to convert ... to SQL. ... I am looking for a tool that works better than the upsize ...
    (microsoft.public.sqlserver)
  • "Overflow!" error when Upsizing from Access
    ... I've just installed MSDE 2000 Release A on WinXP Pro. ... All seems okay, but when I try to upsize an Access Database, I get a message box saying "Overflow!". ...
    (microsoft.public.sqlserver.msde)
  • Recommendation for tools converting access databases to SQL
    ... We have several Access database that we would over time plan to convert ... to SQL. ... I am looking for a tool that works better than the upsize ...
    (microsoft.public.sqlserver)
  • Recommendation for tools converting access databases to SQL
    ... We have several Access database that we would over time plan to convert ... to SQL. ... I am looking for a tool that works better than the upsize ...
    (microsoft.public.sqlserver)