joepeacock
Programmer
I am setting up a utility for a client wherein their salespeople will be able to sync their contacts on their Pocket PCs to a database on our server using a third party utility. Each salesperson needs a separate set of data, but the company management will have web-based access to the database to be able to pull up all contacts and run reports, etc., so the model I have been creating has a table with all of the contact data. Each salesperson, then, will sync to their own view, which is simply based on the main table, with only the contacts in their territory, based on the TERRCODE field. Pretty simple and it's working so far.
Today's challenge: When a salesperson creates a new contact on their mobile device and then syncs it to the database, the new record is created in the database, but since the TERRCODE is not part of the database on the mobile device, that field is blank on the server database. Question: Can I force a default value in a view? For instance, if I create a new record in the "ST_TERRITORY" view (The view is all of the records in the contacts database with a TERRCODE value of "ST"
, the TERRCODE field will autmoatically be filled with "ST". Obviuosly this is possible on a table, but how do I do it on a view?
Thanks,
Joe
Today's challenge: When a salesperson creates a new contact on their mobile device and then syncs it to the database, the new record is created in the database, but since the TERRCODE is not part of the database on the mobile device, that field is blank on the server database. Question: Can I force a default value in a view? For instance, if I create a new record in the "ST_TERRITORY" view (The view is all of the records in the contacts database with a TERRCODE value of "ST"
Thanks,
Joe