ADO question: no built-in server-side load time property?

  • Thread starter Thread starter Bob
  • Start date Start date
B

Bob

Is there a way in ADO.Net to get the (SQL server) time of load of a dataset?
I'd rather not have to call a separate stored procedure with SELECT
GETDATE() every time I need this information.

Bob
 
OK, to be precise, when the SqlDataAdapter's Fill method fills the DataSet
with data. Or, more generally, any time I get data from the SQL Server.
 
Than the time is in Now

It builds a dataset on the client not on the server, it is done using the
datareader.

I hope this helps?

Cor
 
Bob, if the SQL Server is on the same computer as your app/web app, etc,
then you can use Now() which will return the same time as the GETDATE() in
the SQL Server.
If not, then you have to select GETDATE() every time you need it.
 
Bob,
ADO.NET does not support that per se.

You will either need to include it with each command you execute (an extra
column on your select statements). Or a second select statement.

Hope this helps
Jay
 
Back
Top