• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Url cannot be null error :(

 
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Happy coding.
reply
    Bookmark Topic Watch Topic
  • New Topic