• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with the 2nd Constructor of Data class

 
Vivian Richards
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Initial Scneario:
I have my Remote server named RMIDataServer containing the Data object.
All the calls to the RMIDataServer are delegated to the Data object.
This RMIDataServer is created from a server application named FBNServer. FBNServer takes the database name as the command line argument.
Now the question:
Since the Data has two constructors, my RMIDataServer also has two constructors. The problem is with the second constructor which takes FieldInfo[] as a parameter. Since FBNServer instantiates RMIDataServer, it needs to pass this information. But how do your pass array of FieldInfo objects as input using the command line.
Please let me know what i am missing.
Thanks,
 
Rick Fortier
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Vivian Richards:
Initial Scneario:
I have my Remote server named RMIDataServer containing the Data object.
All the calls to the RMIDataServer are delegated to the Data object.
This RMIDataServer is created from a server application named FBNServer. FBNServer takes the database name as the command line argument.
Now the question:
Since the Data has two constructors, my RMIDataServer also has two constructors. The problem is with the second constructor which takes FieldInfo[] as a parameter. Since FBNServer instantiates RMIDataServer, it needs to pass this information. But how do your pass array of FieldInfo objects as input using the command line.
Please let me know what i am missing.
Thanks,

The second constructor is used to create a brand new database using the field names you specify. This has no usefulness in the assignment.
 
Catherine McManus
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some people (like me) instead of getting a binary file (db.db) get a load of text that has to be converted into a binary file. That is where the extra constructor can be used. If you are one of the lucky people who already have db.db, you probably wont use it.
Catherine
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!