the database has been placed in state by user "Admin"

charleslau

New member
Local time
Today, 21:49
Joined
Mar 14, 2007
Messages
5
hi,

Everyone know this error? the database has been placed in state by user "Admin"!

We are using a shared database in Access 2003 that is still in Access 2000
format. When more than one user has the database open (by using vb.net), the following error
message appears. "The
database has been placed in a state by user 'Admin' on machine XXXXX that
prevents it from being opened or locked."

How to slove this error? please help!

My following code as below:

Public Function callvalue(ByVal strcallvalue As String)

Dim i As Integer

Dim sql As String
Dim sql2 As String
'Dim i As Integer
Dim strweekday As Integer

' sql = "select emp.empno, emp.empName, emp.empSection,emp.empCitizen, emp.empPosition"
sql = "select (emp.Daily* 26) as monthly, emp.Daily, emp.Incentive, (emp.Daily/8) as AverageHr "
sql = sql + " from emp where emp.empno='" & strcallvalue & "' and emp.empDelete<>'2' and emp.empGender= 'Male' and ((emp.empPosition = 'Operator') or (emp.empPosition = 'Repacker')) and empUpdate<= format('" & currentMYvalue & "', 'yyyy mmmm') order by empUpdate asc "
Try
DB = New OleDbConnection("Provider=microsoft.jet.oledb.4.0; data source=C:\prdsystem\prdnsf.mdb")
DB.Open()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Information, "")
End
End Try
Da = New OleDb.OleDbDataAdapter(sql, DB)
Ds = New DataSet
Da.Fill(Ds, "emp")
dtp = Me.Ds.Tables(0)

If dtp.Rows.Count = 0 Then
' MsgBox("call")
callhistory(strcallvalue)

'Exit Function
ElseIf dtp.Rows.Count > 0 Then
Dim delRow As DataRow
For Each delRow In dtp.Rows

strcalculateAverage = CStr(delRow.Item("AverageHr"))
strcalculateAverageToString = strcalculateAverage.ToString("F")

strmonthly = CStr(delRow.Item("monthly"))
strdaily = CStr(delRow.Item("Daily"))
strincentive = CStr(delRow.Item("Incentive"))
straverage = strcalculateAverageToString

Next
End If
DB.Close()
End Function


Please help! :confused:
 

Users who are viewing this thread

Back
Top Bottom