Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem using datetime() as key value in sqlserver

Status
Not open for further replies.

canter

Programmer
Jan 19, 2001
3
US
I have a little view set up that does nothing but update a particular SQL record on my backend database. The problem seems to be that I'm forced to use the date/time the record was entered into the system as my keyfield for this database. (its the only thing guaranteed unique in the record). If I change the keyfield to something else (say, the order number), the update goes through. When I use the date/time field as the key, I get an "update conflict" message. Is there a problem between Foxpro's datetime format and the one used by sql server 6? I can't seem to find this problem addressed ANYWHERE!

Thanks in advance,

Duane Lunday
 
On your properties for the remote view there should be a set of radio buttons to set the Update Method, with choices such as "Key and Modified" and "TimeStamp". You might try adjusting these to see if it helps. Robert Bradley
Got extra money lying around? Visit:
 
I would seriously try to get whoever designed the sql server table to add a valid primary key (add an integer identity field if nothing else seems appropriate). Using the datetime of an entry is a disaster waiting to happen.
 
Thanks for the replies. It seems that changing the field's type from date to text fixed the problem. As far as it being a disaster waiting to happen, welcome to my career!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top