Creating a datatable from scratch and then I'm inserting with a select in
the sproc to return the current values after the insert. Now I realize the
timestamp column is a datatype of byte, and I'm not trying to insert the
timestamp, but I want to keep the column in the datatable to be populated
with the return values. However, when the dataadapter tries to apply the
update, I'm getting an exception on the datatable timestamp datatype. Any
thoughts?

Re: That pesky timestamp thing by Mark

Mark
Mon Nov 28 07:34:14 CST 2005

"Earl" <brikshoe@newsgroups.nospam> wrote in message
news:OHkulx98FHA.3416@TK2MSFTNGP15.phx.gbl...

> Now I realize the timestamp column is a datatype of byte

What RDBMS?



Re: That pesky timestamp thing by Earl

Earl
Mon Nov 28 09:11:40 CST 2005

Well, the RDBMS is SQL2k, but the issue is on the .Net side -- there is no
actual datatype for timestamp, it is apparently a byte array. I don't see
how I could set that with GetType.

"Mark Rae" <mark@mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:OB28sBC9FHA.1484@tk2msftngp13.phx.gbl...
> "Earl" <brikshoe@newsgroups.nospam> wrote in message
> news:OHkulx98FHA.3416@TK2MSFTNGP15.phx.gbl...
>
>> Now I realize the timestamp column is a datatype of byte
>
> What RDBMS?
>



Re: That pesky timestamp thing by KerryMoorman

KerryMoorman
Mon Nov 28 12:12:02 CST 2005

Earl,

This information may not be what you need, but:

When I read a timestamp value using a datareader I store the value in a byte
array dimemsioned like this:

Private UpdateStamp As Byte()

When I update a row in a table using a timestamp parameter in a Where
clause, I define the parameter as OleDbType.Binary like this:

cmdStudents.Parameters.Add("@UpdateStamp",
OleDb.OleDbType.Binary).Value = Me.UpdateStamp

Kerry Moorman


"Earl" wrote:

> Well, the RDBMS is SQL2k, but the issue is on the .Net side -- there is no
> actual datatype for timestamp, it is apparently a byte array. I don't see
> how I could set that with GetType.
>
> "Mark Rae" <mark@mark-N-O-S-P-A-M-rae.co.uk> wrote in message
> news:OB28sBC9FHA.1484@tk2msftngp13.phx.gbl...
> > "Earl" <brikshoe@newsgroups.nospam> wrote in message
> > news:OHkulx98FHA.3416@TK2MSFTNGP15.phx.gbl...
> >
> >> Now I realize the timestamp column is a datatype of byte
> >
> > What RDBMS?
> >
>
>
>

Re: That pesky timestamp thing by Sahil

Sahil
Mon Nov 28 21:18:42 CST 2005

Is this .NET 2.0 or 1.1?

- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.malik/archive/2005/05/13/63199.aspx
----------------------------------------------------------------------------

"Earl" <brikshoe@newsgroups.nospam> wrote in message
news:OHkulx98FHA.3416@TK2MSFTNGP15.phx.gbl...
> Creating a datatable from scratch and then I'm inserting with a select in
> the sproc to return the current values after the insert. Now I realize the
> timestamp column is a datatype of byte, and I'm not trying to insert the
> timestamp, but I want to keep the column in the datatable to be populated
> with the return values. However, when the dataadapter tries to apply the
> update, I'm getting an exception on the datatable timestamp datatype. Any
> thoughts?
>



Re: That pesky timestamp thing by Earl

Earl
Mon Nov 28 23:17:10 CST 2005

1.1

"Sahil Malik [MVP]" <contactmethrumyblog@nospam.com> wrote in message
news:%23zbHaOJ9FHA.476@TK2MSFTNGP15.phx.gbl...
> Is this .NET 2.0 or 1.1?
>
> - Sahil Malik [MVP]
> ADO.NET 2.0 book -
> http://codebetter.com/blogs/sahil.malik/archive/2005/05/13/63199.aspx
> ----------------------------------------------------------------------------
>
> "Earl" <brikshoe@newsgroups.nospam> wrote in message
> news:OHkulx98FHA.3416@TK2MSFTNGP15.phx.gbl...
>> Creating a datatable from scratch and then I'm inserting with a select in
>> the sproc to return the current values after the insert. Now I realize
>> the timestamp column is a datatype of byte, and I'm not trying to insert
>> the timestamp, but I want to keep the column in the datatable to be
>> populated with the return values. However, when the dataadapter tries to
>> apply the update, I'm getting an exception on the datatable timestamp
>> datatype. Any thoughts?
>>
>
>



Re: That pesky timestamp thing by Jay

Jay
Thu Dec 01 19:09:53 CST 2005

Back in the ASP days I used to convert timestamps to and from SQL int
types so that I could round-trip them from an ASP page. This might be
an option for you - makes dealing with them a whole lot simpler.

On Mon, 28 Nov 2005 00:27:16 -0500, "Earl"
<brikshoe@newsgroups.nospam> wrote:

>Creating a datatable from scratch and then I'm inserting with a select in
>the sproc to return the current values after the insert. Now I realize the
>timestamp column is a datatype of byte, and I'm not trying to insert the
>timestamp, but I want to keep the column in the datatable to be populated
>with the return values. However, when the dataadapter tries to apply the
>update, I'm getting an exception on the datatable timestamp datatype. Any
>thoughts?
>