Database Modification Date

  • Thread starter Thread starter WIlliam Barnes
  • Start date Start date
W

WIlliam Barnes

Using Excel 2000 under Win 2K Pro with MS ActiveX Data Objects 2.5 Library:

I would like to be able to determine if a database has been modified since
my last read. I create my database connection thus:

Dim db as ADODB.Connection
Set db = New ADODB.Connection

With db
If .State = adStateOpen Then .Close
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Mode = adModeRead
.Open DbPathString
End With

Is there a property or attribute of the database connection that I can
access to determine this information?
 
Hi,

You might use File.GetLastWriteTime method.
I am not sure that it will show you *only* changes or each access.
 
I guess that was my question: Is there a way to use an attribute or property
of the ADODB.Connection object to retrieve this info, or must I use the MS
Scripting Runtime Library. Sounds like I do.

Miha Markic said:
Hi,

You might use File.GetLastWriteTime method.
I am not sure that it will show you *only* changes or each access.

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

WIlliam Barnes said:
Using Excel 2000 under Win 2K Pro with MS ActiveX Data Objects 2.5 Library:

I would like to be able to determine if a database has been modified since
my last read. I create my database connection thus:

Dim db as ADODB.Connection
Set db = New ADODB.Connection

With db
If .State = adStateOpen Then .Close
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Mode = adModeRead
.Open DbPathString
End With

Is there a property or attribute of the database connection that I can
access to determine this information?
 
Hi WIlliam,

File.GetLastWriteTime is contained in System.IO namespace.
Why would you need scripting runtime library?

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

WIlliam Barnes said:
I guess that was my question: Is there a way to use an attribute or property
of the ADODB.Connection object to retrieve this info, or must I use the MS
Scripting Runtime Library. Sounds like I do.

Miha Markic said:
Hi,

You might use File.GetLastWriteTime method.
I am not sure that it will show you *only* changes or each access.

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

WIlliam Barnes said:
Using Excel 2000 under Win 2K Pro with MS ActiveX Data Objects 2.5 Library:

I would like to be able to determine if a database has been modified since
my last read. I create my database connection thus:

Dim db as ADODB.Connection
Set db = New ADODB.Connection

With db
If .State = adStateOpen Then .Close
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Mode = adModeRead
.Open DbPathString
End With

Is there a property or attribute of the database connection that I can
access to determine this information?
 
Back
Top