P
Praveen
Here is an easy issue to reproduce:
1) Create a new project.
2) Drop a DataGrid control into the Page. Also drop a OleDbDataAdapter into
the page.
3) Select "Configure Data Adapter..." and pick the NWind.mdb (for example).
Go ahead and run through the wizard, selecting a table via sql query. Note
that at the end of this a Nwind.ldb lock has been created in that dir.
4) Generate the Dataset and set the datagrid's datasource property to point
to that dataset.
5) Run the page and notice that it cannot open the above mdb because of the
above lock.
Like I mentioned the nwind.mdb and it's dir both grant FULL CONTROL to the
"Everyone" account, so that's not the issue.
In fact, if you close VS and reopen, the above lock will be released and the
page could be run without any problem.
So, the quesiton is why does the Data Adapter Wizard create a lock and NOT
release it when it's done?
Surely, having to reopen VS.Net after setting up a connection to an mdb file
is not very elegant. Has this been recognized as a bug? If so, are there
workarounds? I am implementing a custom control and don't mind applying some
workarounds there.
Thanks in advance.
-Praveen
1) Create a new project.
2) Drop a DataGrid control into the Page. Also drop a OleDbDataAdapter into
the page.
3) Select "Configure Data Adapter..." and pick the NWind.mdb (for example).
Go ahead and run through the wizard, selecting a table via sql query. Note
that at the end of this a Nwind.ldb lock has been created in that dir.
4) Generate the Dataset and set the datagrid's datasource property to point
to that dataset.
5) Run the page and notice that it cannot open the above mdb because of the
above lock.
Like I mentioned the nwind.mdb and it's dir both grant FULL CONTROL to the
"Everyone" account, so that's not the issue.
In fact, if you close VS and reopen, the above lock will be released and the
page could be run without any problem.
So, the quesiton is why does the Data Adapter Wizard create a lock and NOT
release it when it's done?
Surely, having to reopen VS.Net after setting up a connection to an mdb file
is not very elegant. Has this been recognized as a bug? If so, are there
workarounds? I am implementing a custom control and don't mind applying some
workarounds there.
Thanks in advance.
-Praveen