Could not use ''; file already in use. or Operation must use an updateable query.

 i developed a web application using ms-access and locally it works all fine i able to insert/update and delete but when i publish the web site to shared hosting company, i started having problems

some times i get error like:

Operation must use an updateable query.

 
System.Data.OleDb.OleDbException: Operation must use an updateable query
 
OR the below error
 
do you know how do i fix this? i'm really concern will i be able to use ms-access mdb in web ?, i will be hitting around 20 to 50 users, i do not have any other choice but to use MDB.

Server Error in '/myApp' Application.

Could not use ''; file already in use.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: Could not use ''; file already in use.

Source Error:

Line 63:  
Line 64:         comm = new OleDbCommand(sSQLCommand, dbCon);
Line 65:         dbCon.Open();
Line 66: 
Line 67:         //execute insert

Its all about coding!
0
nisarkhan
7/7/2006 2:37:08 AM
asp.net.access-datasource 4679 articles. 0 followers. Follow

2 Replies
1514 Views

Similar Articles

[PageSpeed] 39

For the updatable query one make sure your MDB file is read-write and that your ASPNET user has read/write permission on the folder it is in.

As for the "already open" error, I've seen that when opening multiple connections on the same page. What is your connection string? How you connect can sometimes affect how Access behaves.

0
Aidy
7/7/2006 9:22:19 AM

>>What is your connection string?

here is how i'm doing connectin strying....


protected

OleDbConnection dbCon;
protected OleDbCommand comm;

String

sSQLCommand = "INSERT INTO tblContactUs (Name,EmailAddress,PhoneNumber,Message,InsertDate) " + "VALUES('" + _txtName_contactus + "','" + _txtEmailAddress_contactus + "'," + _txtPhoneNumber_contactus + ",'" + _txtMessage_contactus + "','" + DateTime.Now +"');";

comm =

new OleDbCommand(sSQLCommand, dbCon);

dbCon.Open();

//execute insert
int i = comm.ExecuteNonQuery();
Its all about coding!
0
nisarkhan
7/7/2006 1:07:07 PM
Reply:

Similar Artilces:

update query failing 'Operation Must Use An Updateable Query'
Here is the relavent code section: Dim cnn As OleDbConnection cnn = New OleDbConnection cnn.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\aspfiles\doogle1.mdb;User Id=admin;Password=;" cnn.Open() Dim cmd As OleDbCommand cmd = New OleDbCommand cmd.CommandText="INSERT INTO tblMain (Title, ShortDesc, Detail, CreatedOn) VALUES ('testtitle', 'testShortDesc', 'TestDetail', '1/1/2001')" cmd.Connection=cnn cmd.ExecuteNonQuery() cnn.Close() ------------------------------------ I get a Server Error 'Operation Must Use An Updatea...

Could not use ''; file already in use
Hi, the error "Could not use ''; file already in use" is a fequent problem I can see on these forums with Access but I have checked all the usual suspects (below) and am sure it must be a VS 2005 bug as the error occurs when editing a basic GridView (straight via Design mode editing, no extra code so no connection issues unless I need to close manually but then, what is the point in such codeless editing in VS?). It seems pinpointed enough by the fact that if I close VS (and the whole thing, not just the page!), the .ldb locking file disappears and the page is ok again. Until ...

Could not use ''; file already in use.
I am an asp convert. And I must say some things that use to be so easy are not so easy in asp.net. here is my lastest problem. I would apprecate any help that I get. Me.OleDbConnection1 = New System.Data.OleDb.OleDbConnection ' 'OleDbConnection1 ' Me.OleDbConnection1.ConnectionString = "Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDB:Database L" & _ "ocking Mode=1;Jet OLEDB:Database Password=;Data Source=""C:\Documents and Setting" & _ &q...

Could not use ''; file already in use.
Hi There - for some reason I am getting this error, but I am 100% positive that the database being referenced in my ASP.NET is not open, in fact, there isn't even a lock file. This error seems to occur on one page only, but the code is simple and I can't understand why it would cause this error. Any help would be greatly appreciated. Dim connection As New OleDbConnection(ConfigurationSettings.AppSettings("ConnectionString")) Dim command As OleDbCommand Dim sql As String Dim result As OleDbDataReader Dim CodeParam As OleDb...

Could not use ''; file already in use.
Can someone pls help.... I just don't understand where the error is coming from??? I got this error when i tried to convert from one aspx file to aspx and aspx.vb files... Previously before converting everything was smooth... The error is Server Error in '/fyp' Application. -------------------------------------------------------------------------------- Could not use ''; file already in use. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it origina...

Could not use ''; file already in use. #2
I have a web application in c:\Inetpub\wwwroot\myWeb, the database is in c:\Inetpub\wwwroot\myWeb\database\mydb.mdb, when I run the application, I got the above error messages, "Could not use ''; file already in use.". Then I moved the database to c:\database\mydb.mdb, everything works fine, but is there some difference between these two location? Thanks, You might be running into security errors or keeping the database in Access open while ASP.NET tries to access it. RobRob Ellis It's my guess also when I first got this error, because that's the only change I made. ...

Could not use ''; file already in use aspx
aspx file should access to Access Database file. If database file is open by another user, it gives "Could not use ''; file already in use aspx " error message. If "Everyone" user has write permission on this file, it works fine. But it is not a secure. What is the best way of securing the database?thank you very muchKarakas Can you try granting only the process identity read/write access to that database?thankslauraThis posting is provided "AS IS" with no warranties, and confers no rights. Thank you Laura,I gave priviliges to Network Services and it worked. Did you mean that by "pr...

Could not use ''; file already in use. #2
Hello,I need help....its very urgent......I know that there are many posts regarding this issue. I have tried many solutions that have been posted at this website and others regarding this issue and have not had complete success in resolving it.  I have a running website ...(which is live & Access database using ASP.NET 2.0) I got following error... Could not use ''; file already in use. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where i...

How to solve this problem- Could not use ''; file already in use.
dbconn=New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data source=" & server.mappath("bbc.mdb"))dbconn.Open()sql="Select book_type from mfBook where book_type = 'xxx'"dbcomm=New OleDbCommand(sql,dbconn)dbread=dbcomm.ExecuteReader()   I know because of the state of the connection not close, so i just delete or hide the dbconn.open  , but it will occur another error-ExecuteReader requires an open and available Connection. The connection's current state is Closed. y it say my current state is closed. How2 solve it? H.E.L.P You should be opening your connections as la...

'Operation must use an updateable query'
Man, almost there.. worked out all the bugs.. at the end of sub it fails when I try to use the update feature.. here's the error: Operation must use an updateable query. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.OleDb.OleDbException: Operation must use an updateable query. Source Error: Line 134: myCommand.Parameters.Add(parameterDisc) Line 135: Line 136: myCommand.ExecuteNonQue...

The old 'Operation must use and updateable query' error
Here it is March, so I guess it's time to bring back this old problem again.  I've had it before and using suggestions from hundreds of post I usually got it working. This time is different. This database application resides on a Windows 2003 Server IIS 6. I can read and update the database from my local PC.I can read the database from then intranet but I can not update it. I have given Full Control permissions to the following accounts on the folder that has the .mdb database residing in it: AdministratorsAnonymousASP.NETCreator OwnerEveryoneGuestISUR_...IWAM_...Net...

Where to use 'use'
Hello All, I have a trivial question. I have a perl script, with several sub-routines. In one of those routines, I currently have listed 'use Date::Calc'. So that package is therefore only available (and needed) in that one sub-routine. My question is, should all 'use' statements be placed at the top of the script, or only in routines that need them? -Jeff __________________________________________________ Do you Yahoo!? Yahoo! Web Hosting - establish your business online http://webhosting.yahoo.com There is no added value trying to make a module ...

System.Data.OleDb.OleDbException: Could not use ''; file already in use.
I am continually getting the following error on one of my ASP.NET pages written in C#: Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.OleDb.OleDbException: Could not use ''; file already in use.Source Error: Line 96: dataAdapter.SelectCommand = dbCommand; Line 97: System.Data.DataSet dataSet = new System.Data.DataSet(); Line 98: dataAdapter.Fill(dataSet); Line 99: Line 100: return dataSet; I tr...

System.Data.OleDb.OleDbException: Could not use ''; file already in use
I'm following StrongTypes lesson on "HOW TO: Using sorting / paging on GridView w/o a DataSourceControl DataSource" (http://forums.asp.net/t/956540.aspx) and I'm having a problem where, apparently, the database connection is still open and locked. Help please! Exception Details: System.Data.OleDb.OleDbException: Could not use ''; file already in use.Source Error: Line 115: Line 116: DataTable publishersDataTable = new DataTable("Publishers");Line 117: publishersDataAdapter.Fill(publishersDataTable);Line 118...

Web resources about - Could not use ''; file already in use. or Operation must use an updateable query. - asp.net.access-datasource

Resources last updated: 1/17/2016 3:09:08 AM