Click here to Skip to main content
15,885,912 members
Home / Discussions / Database
   

Database

 
QuestionAlias for table names Pin
smita_roy26-Aug-05 1:45
smita_roy26-Aug-05 1:45 
AnswerRe: Alias for table names Pin
Not Active26-Aug-05 3:47
mentorNot Active26-Aug-05 3:47 
AnswerRe: Alias for table names Pin
softty28-Aug-05 8:27
softty28-Aug-05 8:27 
Questiondynamic datasource on reporting services Pin
Ali Sapanci25-Aug-05 23:18
Ali Sapanci25-Aug-05 23:18 
AnswerRe: dynamic datasource on reporting services Pin
Ali Sapanci28-Aug-05 22:28
Ali Sapanci28-Aug-05 22:28 
Questionquerying a Acces DataBase Pin
Binary011025-Aug-05 21:26
Binary011025-Aug-05 21:26 
AnswerRe: querying a Acces DataBase Pin
beatles169227-Aug-05 2:22
beatles169227-Aug-05 2:22 
QuestionMore info on: Error Could Not Lock File Pin
Javolin25-Aug-05 12:28
Javolin25-Aug-05 12:28 
I am useing an OleDbDataAdapter with an OleDbConnection. This is connecting directly to a Microsoft Access database (.mdb) with Jet4 inside of a web form ASP.Net page useing Visual Basic.

I have a datagrid object on the page which is databound to the dataset useing the following code.

OleDbDataAdapter1.Fill(DataSet41)
DataGrid1.DataBind()

The code is placed in the page's load event and the .mdb database file as full user permision on the ASP.NET account.

Here is the interesting part that I have discovered. We all know that when you open a database that it will create a .ldb file for locking. When I run the web form it will generate this error.

Could not lock file.
Exception Details: System.Data.OleDb.OleDbException: Could not lock file.
Source Error:
Line 101: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Line 102: 'Put user code to initialize the page here
Line 103: OleDbDataAdapter1.Fill(DataSet41)
Line 104: DataGrid1.DataBind()
Line 105: End Sub

After playing with this for a while what I did was set the .ldb files ASP.NET permissions to also have full user control for read and write. When I run the page with this .ldb files permissions set in this manner the datagrid will populate the information from the dataset with no errors.

Here is my problem... when you close the webform naturally the .ldb file is deleted automatically. When I run the webform again it will generate another .ldb file but the permissions are back in its orrigional form and I receive the same error "Could Not Lock File" as above.

How do I solve this problem? It appears to me the issue is the .ldb files permissions must be set to accept the ASP.NET read/write permissions but this is a temperary file. Any suggestions as to how I can fix this issue I would really appreciate the help!

Javolin
VB.Net, ASP.Net
GeneralMDAC Sdk 2.8 Help Pin
dvptUml24-Aug-05 13:46
dvptUml24-Aug-05 13:46 
GeneralRecord locking ADO -net Pin
HahnTech24-Aug-05 9:47
HahnTech24-Aug-05 9:47 
GeneralRe: Record locking ADO -net Pin
miah alom25-Aug-05 8:36
miah alom25-Aug-05 8:36 
GeneralRe: Record locking ADO -net Pin
HahnTech25-Aug-05 8:51
HahnTech25-Aug-05 8:51 
GeneralRe: Record locking ADO -net Pin
Rob Graham26-Aug-05 11:48
Rob Graham26-Aug-05 11:48 
GeneralRe: Record locking ADO -net Pin
Alomgir Miah28-Aug-05 7:39
Alomgir Miah28-Aug-05 7:39 
QuestionOpen Source Data Modeling Software? Pin
Turtle Hand24-Aug-05 7:34
Turtle Hand24-Aug-05 7:34 
QuestionInsert Null Value to Foxpro table? Pin
Member 185596324-Aug-05 5:58
Member 185596324-Aug-05 5:58 
AnswerRe: Insert Null Value to Foxpro table? Pin
Michael Potter25-Aug-05 9:55
Michael Potter25-Aug-05 9:55 
GeneralRe: Insert Null Value to Foxpro table? Pin
Member 185596325-Aug-05 22:30
Member 185596325-Aug-05 22:30 
GeneralRe: Insert Null Value to Foxpro table? Pin
Michael Potter26-Aug-05 3:43
Michael Potter26-Aug-05 3:43 
GeneralRe: Insert Null Value to Foxpro table? Pin
Member 185596326-Aug-05 3:54
Member 185596326-Aug-05 3:54 
Generalte data in just one columnBulk Insert from text File Pin
Daredeviljpr24-Aug-05 5:04
Daredeviljpr24-Aug-05 5:04 
GeneralRe: te data in just one columnBulk Insert from text File Pin
Frank Kerrigan24-Aug-05 6:03
Frank Kerrigan24-Aug-05 6:03 
GeneralRe: te data in just one columnBulk Insert from text File Pin
Daredeviljpr25-Aug-05 3:48
Daredeviljpr25-Aug-05 3:48 
GeneralStored Procedures or Direct SQL Statements Pin
emadns24-Aug-05 0:23
emadns24-Aug-05 0:23 
GeneralRe: Stored Procedures or Direct SQL Statements Pin
Frank Kerrigan24-Aug-05 0:35
Frank Kerrigan24-Aug-05 0:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.