Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Self teaching, cannot lock database file

Reply
Thread Tools

Self teaching, cannot lock database file

 
 
Michael Powell
Guest
Posts: n/a
 
      03-29-2005
Hi,
I have been teaching myself C# and ASP, i wrote a sign-in and register
program to teach myself the use of SQL and databases using C# as the
development language.
Yesterday my little program worked a treat (except for the lack of error
handling), i came back to it today to complete it, and when i run the
program i get the following error:

Exception Details: System.Data.OleDb.OleDbException: Could not lock file.

Source Error:

Line 74:
this.oleDbCommand1.Parameters.Add("pass",OleDbType .Char).Value=this.TextBox2.Text;
Line 75: if(this.oleDbConnection1.State!=ConnectionState.Op en)
Line 76: this.oleDbConnection1.Open();
Line 77: OleDbDataReader rdr=this.oleDbCommand1.ExecuteReader();
Line 78: if(rdr.HasRows)


does anyone know why this error occurs, or how to fix it.
(I don't actualy mind it not working, i just NEED to understand it!)
Any input would be most apprecciated

Mike Powell


 
Reply With Quote
 
 
 
 
=?Utf-8?B?U2NvdHQgU2ltb25z?=
Guest
Posts: n/a
 
      03-29-2005
What database are you using.
 
Reply With Quote
 
 
 
 
Hans Kesting
Guest
Posts: n/a
 
      03-29-2005
Michael Powell wrote:
> Hi,
> I have been teaching myself C# and ASP, i wrote a sign-in and register
> program to teach myself the use of SQL and databases using C# as the
> development language.
> Yesterday my little program worked a treat (except for the lack of error
> handling), i came back to it today to complete it, and when i run the
> program i get the following error:
>
> Exception Details: System.Data.OleDb.OleDbException: Could not lock file.
>
> Source Error:
>
> Line 74:
> this.oleDbCommand1.Parameters.Add("pass",OleDbType .Char).Value=this.TextBox2.Text;
> Line 75: if(this.oleDbConnection1.State!=ConnectionState.Op en)
> Line 76: this.oleDbConnection1.Open();
> Line 77: OleDbDataReader rdr=this.oleDbCommand1.ExecuteReader();
> Line 78: if(rdr.HasRows)
>
>
> does anyone know why this error occurs, or how to fix it.
> (I don't actualy mind it not working, i just NEED to understand it!)
> Any input would be most apprecciated
>
> Mike Powell
>
>


I think this happens in Access, when you have a designer open.


--
Hans Kesting
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing self: if self is a tree how to set to a different self Bart Kastermans Python 6 07-13-2008 11:19 AM
__autoinit__ (Was: Proposal: reducing self.x=x; self.y=y;self.z=z boilerplate code) falcon Python 0 07-31-2005 05:41 PM
Re: __autoinit__ (Was: Proposal: reducing self.x=x; self.y=y;self.z=z boilerplate code) Ralf W. Grosse-Kunstleve Python 2 07-12-2005 03:20 AM
Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code Ralf W. Grosse-Kunstleve Python 16 07-11-2005 09:28 PM
__autoinit__ (Was: Proposal: reducing self.x=x; self.y=y;self.z=z boilerplate code) Ralf W. Grosse-Kunstleve Python 18 07-11-2005 04:01 PM



Advertisments