2 Replies - 1151 Views - Last Post: 27 April 2013 - 08:54 PM Rate Topic: -----

#1 jayveeeeeee  Icon User is offline

  • D.I.C Head

Reputation: -1
  • View blog
  • Posts: 66
  • Joined: 27-September 12

operation not allowed when the object is closed

Posted 27 April 2013 - 09:10 AM

i am doing my login , WHEN I press the button said operation not allowed when the object is closed ,

its determine in this code


 

 Call DisplayCapsState
Dim a As String
Set rs = New ADODB.Recordset

 
a = "select * from account where Username = " & "'" & Combo1.Text & "'" & " and Password = " & "'" & Text2.Text & "'"
Set rs = con.Execute(a)

If Not rs.EOF Then
MsgBox "Success"
Set rs = Nothing
Combo1.Text = ""
Text2.Text = ""
Else
MsgBox "Not Success"
End If




please can anyone can help me ,and can give me idea

Is This A Good Question/Topic? 0
  • +

Replies To: operation not allowed when the object is closed

#2 andrewsw  Icon User is online

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3490
  • View blog
  • Posts: 11,902
  • Joined: 12-December 12

Re: operation not allowed when the object is closed

Posted 27 April 2013 - 09:17 AM

That error message is quite clear; you haven't opened your database connection

con.Open()

Was This Post Helpful? 0
  • +
  • -

#3 jayveeeeeee  Icon User is offline

  • D.I.C Head

Reputation: -1
  • View blog
  • Posts: 66
  • Joined: 27-September 12

Re: operation not allowed when the object is closed

Posted 27 April 2013 - 08:54 PM

sorry if i disturb you But thanks ... i fix my problem now ..
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1