Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I can't seem to get my ODBC url right

 
Chaz Andrews
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've tried every combination I can think off for my ODBC connection, but nothing seems to work. I'm trying to connect to my web service's database. They claim its not blocked, but who knows
the address is www.coconutandmango.com
my ODBC user id is chaz003
its password is somthing else
the database is database1

String url = "jdbc:// odbc://coconutandmango.com;UID=chaz003;PWD=wouldntyouliketoknow";

What am I doing wrong
[ January 04, 2006: Message edited by: Chaz Andrews ]
 
stu derby
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

In other words, an ODBC connection usually doesn't refer to a hostname, but rather to a DSN which knows about the host. Here's some references:
http://www.sourcecodesworld.com/howto/java/java-0107.asp
http://www.onjava.com/pub/a/onjava/synd/2001/08/21/jdbc.html

However, you can also use a DSN-less ODBC connection; in this style of connection, you must supply all sorts of ODBC information that is normally part of the DSN configuration. Here are some examples:
http://www.sourcecodesworld.com/howto/java/java-0345.asp

Third, a lot of connection issues and syntax depend on the particular driver being used and the particular database program being connected to; if the above info doesn't help, you might provide that information and post the rest of your connection code and what sorts of errors you're getting, maybe someone else will spot something wrong...

[edited to disable smilies]
[ January 04, 2006: Message edited by: Jeanne Boyarsky ]
 
Chaz Andrews
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
wow, thanks stu, thats really helpful
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic