0

We have a timestamp type column in our table.

I am trying to retrieve that is vb.net using data reader.

datareader.GetValue(dr.GetOrdinal("timestamp")).ToString()

It is not showing the value from the database. How should I retrieve the value? or how to cast it correctly?

3
  • 2
    You appear to be using two different data readers in that code. Either that is a likely candidate for your problem or you have provided code that is not representative of what you're actually doing. Also, you haven't explained what that code actually does do. Commented Jun 26, 2020 at 0:41
  • stackoverflow.com/a/8119407/8367626 Commented Jun 26, 2020 at 5:29
  • @Mary good catch. In this case, this is dupe question Commented Jun 26, 2020 at 12:45

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.