Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Url cannot be null error :(

 
H Melua
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey mates

the following code compiles but its giving me this error
"The url cannot be null"

and i dont know how to resolve it

all your comments are appreciated



my Database.Properties holds


and i registered the database, i dont know if i did it right! but thats what i did
Control Panel > Administrative Tools > Data Sources (ODBC)

1. Clicked on Add
2. Selected Microsoft Access Driver (*.mdb)
3. Filled in a name (i didnt know what that name was for!)
4. Hit Select and chose "Shop" database.
5. Hit OK.
6. Another OK

can any1 suggest a solution?

thank youuuu
Hannah
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in your code:
String database = props.getProperty("database.RHCShop") ;
in your properties:
database.Shop = jdbc:odbc:Shop
 
H Melua
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank u david
but now it gives me this error
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

i thought i added the driver why isnt it accepting it? was it added correctly or have i missed out something?

thnx alot for responding
hannah
 
H Melua
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Done

thanks to every1 who entered this thread to help but couldnt and again thank u to david for sorting that problem out for me
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Happy coding.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic