473,324 Members | 2,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Datagrid1

if i try to search my datagrid twice it says.
Run time error '3705'
Operation not allowed when object is open.
Expand|Select|Wrap|Line Numbers
  1.       DataEnvironment1.command1 test & "%"
  2.  
Nov 4 '07 #1
2 1367
QVeen72
1,445 Expert 1GB
if i try to search my datagrid twice it says.
Run time error '3705'
Operation not allowed when object is open.
Expand|Select|Wrap|Line Numbers
  1.       DataEnvironment1.command1 test & "%"
  2.  
Hi,

Before Passing the parameter, Close the Data Env's Connection Object:
Expand|Select|Wrap|Line Numbers
  1. With DataEnvironment1.Connection1
  2.     If .State = adStateOpen Then     .Close
  3.     .Open
  4.     .Command1 test & "%"
  5. End With
  6.  
REgards
Veena
Nov 5 '07 #2
debasisdas
8,127 Expert 4TB
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.
Nov 5 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Ralf | last post by:
Hi NG, if there a way to Clear a DataGrid dataGrid1.TableStyles.Clear(); or dataGrid1.TableStyles.Remove(tblStyle); or dataGrid1.TableStyles.RemoveAt(intDG); or not work!? ...
1
by: JIM.H. | last post by:
Hello, After doing DataGrid1.DataBind();, how can I check if there is any data in DataGrid1 in C#? Thanks, Jim.
0
by: Craig | last post by:
Hello, I have a web form that allows the user to move a unit on a manufacturing router. The user click one of five buttons which each represent a step on the router. When the user clicks any...
3
by: Jerry Spence1 | last post by:
I have created some definitions at design time for a Datagrid. How do I actually switch one of the definition on - ie make it active? I've tried Datagrid1.TableStyles.Add - but that just adds it...
0
by: kevin.mcgrane | last post by:
Hi I have a C# application with a couple of datagrids. Datagrid1 datasource is pointing to a storeprocedure that returns orders. I want to be able to double click datagrid1 and assign the row...
0
by: kevin | last post by:
Hi I have a C# application with a couple of datagrids. Datagrid1 datasource is pointing to a storeprocedure that returns orders. I want to be able to double click datagrid1 and assign the...
0
by: Stephen Plotnick | last post by:
My program goes into this routine no matter what I do. I would think it would only go in this routine if the current cell changes.
1
by: rodriguez.a.christian | last post by:
I cannot make my update command work for a datagrid: Public Class subcatinsert Inherits System.Web.UI.Page Protected WithEvents SqlCon As System.Data.SqlClient.SqlConnection Protected...
1
by: gopi2ks | last post by:
hi how to use the custom paging for a datagrid by using c# please give the code regards
1
by: irfan.ahmed | last post by:
Dear All, Kindly let me know how to update datagrid2 based on value of datagrid1, I have one datagrida filled with current sale and its updating continuously, I need to show in datagrid2...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.