-2147467259: cannot open any more database

T

t5084

I call the procedure set_document_period on form access 2002.
On my computer is ok(os:win xp) but on my user computer(os:win2000 server
and win'98) is shown Error "-2147467259: cannot open any more database"
I is not all of my forms . It is only some forms.




Private Sub set_document_period()
Dim Ldb_rst As New ADODB.Recordset
Dim Lstrsql As String
Dim Lreturn As Integer
Lstrsql = "SELECT current_month_period,last_month_period" _
& " FROM CMCTLM "
Lreturn = Std_open_rst_r(Ldb_rst, Lstrsql, True)
If Not Ldb_rst.EOF Then
If Me!backdate_flag = "Y" Then
Me!document_period = Ldb_rst!last_month_period
Else
Me!document_period = Ldb_rst!current_month_period
End If
End If
End Sub


Function Std_open_rst_r(pdb_Rst As ADODB.Recordset, pstrsql As String,
Pshow_err As Boolean) As Integer
On Error Resume Next
pdb_Rst.Close
On Error GoTo err_std_open_rst_r
pdb_Rst.ActiveConnection = db_cnn
pdb_Rst.CursorType = adOpenStatic
pdb_Rst.LockType = adLockReadOnly
pdb_Rst.Open pstrsql
Std_open_rst_r = 0
GoTo end_std_open_rst_r
err_std_open_rst_r:
If Nz(Pshow_err, False) Then
MsgBox ("std_open_rst_r:" & Err.Number & ":" & Err.description)
End If
Std_open_rst_r = 1
end_std_open_rst_r:
End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top