Re: Passing Timestamp value to sql server
From: Sylvain Lafontaine ("Sylvain)
Date: 09/08/04
- Next message: Beth: "Re: Passing Timestamp value to sql server"
- Previous message: Sylvain Lafontaine: "Re: Please help with SQL syntax"
- In reply to: anonymous_at_discussions.microsoft.com: "Re: Passing Timestamp value to sql server"
- Next in thread: Beth: "Re: Passing Timestamp value to sql server"
- Reply: Beth: "Re: Passing Timestamp value to sql server"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 7 Sep 2004 22:11:35 -0400
First, the following example cast the timestamp to a data type of datetime:
You can also cast it to another type. Surely you can find a lot of other
examples by making a search on the internet.
Second, unless you are using a table lock, you must not check if the data
has been updated before you make the update but at the same time; otherwise
you can hit a race course condition. This can easily be easily achieved by
putting all the tests in the same WHERE condition as the UPDATE query.
S. L.
<anonymous@discussions.microsoft.com> wrote in message
news:7acf01c4953f$865c9830$a601280a@phx.gbl...
>I still need to pass the value back to the server.
>
> Basically, I have a form that connects to the server, gets
> the data, then release the connection. If the user updates
> something, then I need to check to see if the data has
> been updated before I do an update. If I was connected all
> the time to the server, then the solution is simple -- I
> let the server handle it. Yet, I need the value of the
> timestamp to compare but I don't know what datatype to
> store or pass back so a stored procedure can process it.
>
> All this is of course done in ADP.
>
> If you have any other ideas please post. Thanks.
>
>>-----Original Message-----
>>Can't you use a Trigger to check for updates?
>>
>>Create Trigger PasswordTable_Trigger1
>>
>>On dbo.PasswordTable
>>
>>For /* Insert, Update, Delete */
>>
>>As
>>
>>/* If Update (column_name) ...*/
>>
>>hth,
>>
>>bob mcclellan
>>
>>
>>
>>"Beth" <anonymous@discussions.microsoft.com> wrote in
> message news:7a5d01c4951b$6ed8e3e0$a301280a@phx.gbl...
>>> Hello,
>>>
>>> To resolve concurrency issues, I am retrieving sql
>>> timestamp value and with every update passing the value
>>> back and raising an error if the timestamp has changed.
> My
>>> problem is that I don't know what data type to pass in
> the
>>> CreateParamater method. I am using ADP and created a
>>> stored procedure.
>>>
>>> A related question is what other method can I use to
> check
>>> for updates if I don't have direct table permissions. I
>>> cannot use SELECT statements. I can only access stored
>>> procedures.
>>>
>>> Thanks.
- Next message: Beth: "Re: Passing Timestamp value to sql server"
- Previous message: Sylvain Lafontaine: "Re: Please help with SQL syntax"
- In reply to: anonymous_at_discussions.microsoft.com: "Re: Passing Timestamp value to sql server"
- Next in thread: Beth: "Re: Passing Timestamp value to sql server"
- Reply: Beth: "Re: Passing Timestamp value to sql server"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|