Re: how do i get a SQL timestamp into/out of a grid?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Craig G (craig.gamble_at_y_arrasoftware.com)
Date: 03/01/05


Date: Tue, 1 Mar 2005 21:01:48 -0000

opps

should read
myTimeStamp = Convert.FromBase64String(CType(e.Item.Cells(5).Controls(1),
Label).Text)

but i still get the 1-dimensional array of byte cannot be converted to
string

"bruce barker" <nospam_brubar@safeco.com> wrote in message
news:eQQnO$pHFHA.1980@TK2MSFTNGP10.phx.gbl...
> '* store in field
> CType(e.Item.Cells(5).Controls(1), Label).Text.Text =
> System.ConvertToBase64String(myTimeStamp)
>
> '* fetch from field
> myTimeStamp = System.ConvertFromBase64(CType(e.Item.Cells(5).Controls(1),
> Label).Text)
>
> -- bruce (sqlwork.com)
>
> "Craig G" <craig.gamble@y_arrasoftware.com> wrote in message
> news:OCcPRUpHFHA.4032@TK2MSFTNGP12.phx.gbl...
> | i have a hidden template column that contains a label which is populated
> | with a SQL Timestamp. the problem is each time i bring the timestamp out
> it
> | is coming out as "System.Byte[]" which is just a string
> |
> | i understand that the timestamp cannot be seen as its binary but
what/how
> am
> | i meant to store it in within the grid and then return it out if the
user
> | selects that particular record
> |
> | ive just been using this to return other fields but that wont work for
the
> | timestamp
> | myTimeStamp = CType(e.Item.Cells(5).Controls(1), Label).Text
> |
> | anyone any idea's?
> |
> | Cheers,
> | Craig
> |
> |
>
>



Relevant Pages

  • Re: logging time spent on my website
    ... I store the timestamp in db ok thats cool. ... Thats why I was thinking of a endless loop. ... > you now have 2 items, last length of time, and current time stamp. ...
    (comp.lang.php)
  • RE: How to read the value of timestamp column
    ... string val = ToHexString; ... and use it in the update command text. ... > I need to get the timestamp value for optimistic concurrency. ... > i tried to convert rowtimestamp to byte array and pass it as the ...
    (microsoft.public.sqlserver.programming)
  • Re: Optimistic Concurrency in a web app
    ... My question was more about how to handle and more specifically when to store the timestamp value: from the initial server postback, after an edit control is displayed to the user or finally when the user posts back. ... When I first display the label version of a field? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Data Base Interface Wizard update problem
    ... Excuse me what do you mean by timestamp field?In my access database i need a ... field of type date/time in order to store the date ... separate field with type timestamp? ...
    (microsoft.public.frontpage.client)
  • Re: Storing Dates in DB
    ... >>> What do you think is the best way to store Dates into a database? ... >> timestamp and then dateto format it as you wish. ... >> this is you are limited to the range of a unix timestamp which is ... Hence my note about the downside:) ...
    (comp.lang.php)