Datagrid1

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • united50
    New Member
    • Oct 2007
    • 2

    Datagrid1

    if i try to search my datagrid twice it says.
    Run time error '3705'
    Operation not allowed when object is open.
    Code:
          DataEnvironment1.command1 test & "%"
  • QVeen72
    Recognized Expert Top Contributor
    • Oct 2006
    • 1445

    #2
    Originally posted by united50
    if i try to search my datagrid twice it says.
    Run time error '3705'
    Operation not allowed when object is open.
    Code:
          DataEnvironment1.command1 test & "%"
    Hi,

    Before Passing the parameter, Close the Data Env's Connection Object:
    [code=vb]
    With DataEnvironment 1.Connection1
    If .State = adStateOpen Then .Close
    .Open
    .Command1 test & "%"
    End With
    [/code]

    REgards
    Veena

    Comment

    • debasisdas
      Recognized Expert Expert
      • Dec 2006
      • 8119

      #3
      Don't forget to close the connection after database related activity is over. Its even beter to try to open the connections if it already not opened.

      Comment

      Working...