• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Data constructor doubt

 
Nandini Sriram
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
When I use the constructor Data(String dbName), it reads the specified file, but when I try with Data(String dbName, FieldInfo[] fields), it throws a message "Data: request to create pre-existing File db.db". I don't understand.
Thanks
 
Nandini Sriram
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, for now I am not bothering about the remote and local interfaces that are to be defined for the classes. I am just doing the GUI and trying to get the basic display of data. Is that fine?
Thanks
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12014
220
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nandini
When I use the constructor Data(String dbName), it reads the specified file, but when I try with Data(String dbName, FieldInfo[] fields), it throws a message "Data: request to create pre-existing File db.db". I don't understand.

Read the JavaDoc for the constructor Data(String, FieldInfo[]). The JavaDoc explains what this constructor should be used for, and when that exception will be thrown.
Also, for now I am not bothering about the remote and local interfaces that are to be defined for the classes. I am just doing the GUI and trying to get the basic display of data. Is that fine?

That's the way that I did it.
Regards, Andrew
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic