From: firstbizsoft on
Hello all,
I working at a clinic management application for a lot of time and
never give me an error.....and today give me this error:
Run-time error '7005'
Rowset not available

This is the code where give me this error:

Option Explicit
Private mvntKeyValue As Variant
Public mstrSQL As String


Private Sub cmd_Click(Index As Integer)
Select Case Index
Case 0
If AdoTemp.Recordset.RecordCount > 0 Then
<=> mvntKeyValue = ResultGrid.Columns(0).Text <=> here in
this line give me the error
End If
End Select
Unload Me
End Sub
Public Property Get keyValue() As Variant
keyValue = Trim(mvntKeyValue)
End Property

Private Sub Form_Load()
KeyPreview = True
Me.Top = 300
Me.Left = (mdiSystem.Width / 2) - ((mdiSystem.Toolbar1.Width / 2) +
(Me.Width / 2))

Dim strConn As String

Screen.MousePointer = vbHourglass

strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" + _
"Persist Security Info=False;" + _
"Data Source=" + DBFolder + "\" + CLINIC_DB + ";" + _
"Jet OLEDB:Database Password=clinica"

AdoTemp.RecordSource = mstrSQL
AdoTemp.ConnectionString = strConn
AdoTemp.Refresh
ResultGrid.Refresh

AdoTemp.Caption = AdoTemp.Recordset.RecordCount & " Records Returned"

Screen.MousePointer = vbDefault
End Sub

Please help me,
Costel

From: Tim Baur on
=?Utf-8?B?Zmlyc3RiaXpzb2Z0?= <firstbizsoft(a)discussions.microsoft.com> wrote
in news:5B0C356E-7FD5-472E-A9BE-3478DEA257A0(a)microsoft.com:

> If AdoTemp.Recordset.RecordCount > 0

Try instead:

If Not (AdoTemp.Recordset.BOF And AdoTemp.Recordset.EOF) Then

Also, you should probably change you database password now. You just
posted it on a public newsgroup.

From: firstbizsoft on
Sorry Tim, but don't working. He give me the same error. And yes, this is not
the real password.
Costel

"Tim Baur" wrote:

> =?Utf-8?B?Zmlyc3RiaXpzb2Z0?= <firstbizsoft(a)discussions.microsoft.com> wrote
> in news:5B0C356E-7FD5-472E-A9BE-3478DEA257A0(a)microsoft.com:
>
> > If AdoTemp.Recordset.RecordCount > 0
>
> Try instead:
>
> If Not (AdoTemp.Recordset.BOF And AdoTemp.Recordset.EOF) Then
>
> Also, you should probably change you database password now. You just
> posted it on a public newsgroup.
>
>
From: Tim Baur on
=?Utf-8?B?Zmlyc3RiaXpzb2Z0?= <firstbizsoft(a)discussions.microsoft.com>
wrote in news:E47E7A04-CAFE-4A0B-9D23-DE032A458B36(a)microsoft.com:

> Sorry Tim, but don't working. He give me the same error. And yes, this
> is not the real password.
> Costel
>

I'm assuming that your grid is data-bound.

If so, then is the recordset still open with data at this point?

What happens when you try:
Debug.Print AdoTemp.Recordset(ResultGrid.Columns(0).DataField)
From: firstbizsoft on

Hi Tim,

When I try:
Debug.Print AdoTemp.Recordset(ResultGrid.Columns(0).DataField), give me
this error:

Run-time error '3265'

did not find the element that corresponds{fits} with the name or the ordinal
order



and the mvntKeyValue = ResultGrid.Columns(0).Text heve the same error
Rowset not available

Regards,

Costel


"Tim Baur" wrote:

> =?Utf-8?B?Zmlyc3RiaXpzb2Z0?= <firstbizsoft(a)discussions.microsoft.com>
> wrote in news:E47E7A04-CAFE-4A0B-9D23-DE032A458B36(a)microsoft.com:
>
> > Sorry Tim, but don't working. He give me the same error. And yes, this
> > is not the real password.
> > Costel
> >
>
> I'm assuming that your grid is data-bound.
>
> If so, then is the recordset still open with data at this point?
>
> What happens when you try:
> Debug.Print AdoTemp.Recordset(ResultGrid.Columns(0).DataField)
>
 |  Next  |  Last
Pages: 1 2
Prev: MS Calendar Control
Next: runtime error 429