File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Url cannot be null error :( Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Url cannot be null error :(" Watch "Url cannot be null error :(" New topic
Author

Url cannot be null error :(

H Melua
Ranch Hand

Joined: Jan 04, 2005
Posts: 172
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

Joined: Mar 06, 2001
Posts: 13459

in your code:
String database = props.getProperty("database.RHCShop") ;
in your properties:
database.Shop = jdbc:odbc:Shop
H Melua
Ranch Hand

Joined: Jan 04, 2005
Posts: 172
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

Joined: Jan 04, 2005
Posts: 172
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

Joined: Mar 06, 2001
Posts: 13459

Happy coding.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Url cannot be null error :(
 
Similar Threads
help me in improving performance of prepared statement
Record Locking in multi-user
an example to insert data into Oracle Clob
jdbc in Unix
how to delete data from a dbase