C
CMeStandingHere
The code that I am using is below. No errors are output by the code
and it seems to run correctly. I check the database and nothing has
happened. Any ideas? I usally don't post things but this is becoming
stupid.
Public Shared Sub UpdateModifiedDate(ByVal fl As FileInfo)
Dim Cn As New OleDbConnection
With Cn
.ConnectionString =
"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=x:\AccessDatabase\Limiter.mdb;User Id=admin;Password=;"
.Open()
End With
Dim UpdateCmd As OleDbCommand = New
OleDbCommand("[qryUpdateModifiedDate]", Cn)
With UpdateCmd
.CommandType = CommandType.StoredProcedure
Dim prm As OleDbParameter
prm = New OleDbParameter("CFile_Name",
OleDbType.VarChar)
prm.Value = "'" & fl.Name & "'"
.Parameters.Add(prm)
prm = New OleDbParameter("CFileDateModified",
OleDbType.Date)
prm.Value = fl.LastWriteTime '.ToString
.Parameters.Add(prm)
Try
.ExecuteReader(CommandBehavior.SingleRow)
Catch ex As Exception
Stop
Catch ex As OleDbException
Stop
End Try
End With
Cn.Close()
End Sub
and it seems to run correctly. I check the database and nothing has
happened. Any ideas? I usally don't post things but this is becoming
stupid.
Public Shared Sub UpdateModifiedDate(ByVal fl As FileInfo)
Dim Cn As New OleDbConnection
With Cn
.ConnectionString =
"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=x:\AccessDatabase\Limiter.mdb;User Id=admin;Password=;"
.Open()
End With
Dim UpdateCmd As OleDbCommand = New
OleDbCommand("[qryUpdateModifiedDate]", Cn)
With UpdateCmd
.CommandType = CommandType.StoredProcedure
Dim prm As OleDbParameter
prm = New OleDbParameter("CFile_Name",
OleDbType.VarChar)
prm.Value = "'" & fl.Name & "'"
.Parameters.Add(prm)
prm = New OleDbParameter("CFileDateModified",
OleDbType.Date)
prm.Value = fl.LastWriteTime '.ToString
.Parameters.Add(prm)
Try
.ExecuteReader(CommandBehavior.SingleRow)
Catch ex As Exception
Stop
Catch ex As OleDbException
Stop
End Try
End With
Cn.Close()
End Sub