473,387 Members | 1,575 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,387 software developers and data experts.

access db via asp.net


I'd greatly appreciate suggestions on a better method for cursing through
access database tables or why I'm getting the following error at
oleConnection.Open().

Do I need an odbc syntax instead of oledb?
Much thanks.

System.Data.OleDb.OleDbException: The database has been placed in a state on
machine 'IO' that prevents it from being opened or locked.

Dim olestring As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\db\db2000_1_client.mdb"
Dim qstring As String = "SELECT * FROM " & aTable & ""

Try

oleConnection = New OleDbConnection(olestring)
'oleDataAdapter = New oledataadapter
oleConnection.Open()

Feb 6 '08 #1
4 994
Try to give ASPNET account rights to the folder which contains the mdb
database and make sure that database is not opened/used by some other
Application.

Regards,
Manish
www.ComponentOne.com
"segue" wrote:
>
I'd greatly appreciate suggestions on a better method for cursing through
access database tables or why I'm getting the following error at
oleConnection.Open().

Do I need an odbc syntax instead of oledb?
Much thanks.

System.Data.OleDb.OleDbException: The database has been placed in a state on
machine 'IO' that prevents it from being opened or locked.

Dim olestring As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\db\db2000_1_client.mdb"
Dim qstring As String = "SELECT * FROM " & aTable & ""

Try

oleConnection = New OleDbConnection(olestring)
'oleDataAdapter = New oledataadapter
oleConnection.Open()
Feb 6 '08 #2
Hello segue,

Are u sure that u are using the right connection string? U can check it there
http://connectionstrings.com/

I recommend u to use the following OLEDB sample how to work with Access DB
in C# http://msdn2.microsoft.com/en-us/lib...52(VS.71).aspx

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
sI'd greatly appreciate suggestions on a better method for cursing
sthrough access database tables or why I'm getting the following error
sat oleConnection.Open().
s>
sDo I need an odbc syntax instead of oledb?
sMuch thanks.
sSystem.Data.OleDb.OleDbException: The database has been placed in a
sstate on machine 'IO' that prevents it from being opened or locked.
s>
sDim olestring As String =
s"Provider=Microsoft.Jet.OLEDB.4.0;Data
sSource=c:\db\db2000_1_client.mdb"
sDim qstring As String = "SELECT * FROM " & aTable & ""
sTry
s>
soleConnection = New OleDbConnection(olestring)
s'oleDataAdapter = New oledataadapter
soleConnection.Open()
Feb 6 '08 #3

Thank you for your responses.

I'm now getting the error:
System.Data.OleDb.OleDbException: The Microsoft Jet database engine cannot
find the input table or query 'Reports'. Make sure it exists and that its
name is spelled correctly.

From:

Dim olestring As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\db\db2000_1_client.mdb;Persist Security Info=False;"
Dim qstring As String = "SELECT * FROM Reports" ' & pwTable & ""

"Michael Nemtsev [MVP]" wrote:
Hello segue,

Are u sure that u are using the right connection string? U can check it there
http://connectionstrings.com/

I recommend u to use the following OLEDB sample how to work with Access DB
in C# http://msdn2.microsoft.com/en-us/lib...52(VS.71).aspx

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
sI'd greatly appreciate suggestions on a better method for cursing
sthrough access database tables or why I'm getting the following error
sat oleConnection.Open().
s>
sDo I need an odbc syntax instead of oledb?
sMuch thanks.
sSystem.Data.OleDb.OleDbException: The database has been placed in a
sstate on machine 'IO' that prevents it from being opened or locked.
s>
sDim olestring As String =
s"Provider=Microsoft.Jet.OLEDB.4.0;Data
sSource=c:\db\db2000_1_client.mdb"
sDim qstring As String = "SELECT * FROM " & aTable & ""
sTry
s>
soleConnection = New OleDbConnection(olestring)
s'oleDataAdapter = New oledataadapter
soleConnection.Open()
Feb 6 '08 #4

Please disregard I figured it out by making a database connection with
visual studio and using the wizards to create functional queries.

Thanks.

"segue" wrote:
>
Thank you for your responses.

I'm now getting the error:
System.Data.OleDb.OleDbException: The Microsoft Jet database engine cannot
find the input table or query 'Reports'. Make sure it exists and that its
name is spelled correctly.

From:

Dim olestring As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\db\db2000_1_client.mdb;Persist Security Info=False;"
Dim qstring As String = "SELECT * FROM Reports" ' & pwTable & ""

"Michael Nemtsev [MVP]" wrote:
Hello segue,

Are u sure that u are using the right connection string? U can check it there
http://connectionstrings.com/

I recommend u to use the following OLEDB sample how to work with Access DB
in C# http://msdn2.microsoft.com/en-us/lib...52(VS.71).aspx

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
sI'd greatly appreciate suggestions on a better method for cursing
sthrough access database tables or why I'm getting the following error
sat oleConnection.Open().
s>
sDo I need an odbc syntax instead of oledb?
sMuch thanks.
sSystem.Data.OleDb.OleDbException: The database has been placed in a
sstate on machine 'IO' that prevents it from being opened or locked.
s>
sDim olestring As String =
s"Provider=Microsoft.Jet.OLEDB.4.0;Data
sSource=c:\db\db2000_1_client.mdb"
sDim qstring As String = "SELECT * FROM " & aTable & ""
sTry
s>
soleConnection = New OleDbConnection(olestring)
s'oleDataAdapter = New oledataadapter
soleConnection.Open()

Feb 6 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

63
by: Jerome | last post by:
Hi, I'm a bit confused ... when would I rather write an database application using MS Access and Visual Basic and when (and why) would I rather write it using Visual Studio .Net? Is it as easy...
13
by: bill | last post by:
I am trying to convince a client that dotNet is preferable to an Access project (ADP/ADE). This client currently has a large, pure Access MDB solution with 30+ users, which needs to be upgraded....
1
by: Dave | last post by:
Hello NG, Regarding access-declarations and member using-declarations as used to change the access level of an inherited base member... Two things need to be considered when determining an...
13
by: Simon Bailey | last post by:
I am a newcomer to databases and am not sure which DBMS to use. I have a very simplified knowledge of databases overall. I would very much appreciate a (simplifed) message explaining the advantages...
0
by: Frederick Noronha \(FN\) | last post by:
---------- Forwarded message ---------- Solutions to Everyday User Interface and Programming Problems O'Reilly Releases "Access Cookbook, Second Edition" Sebastopol, CA--Neither reference book...
20
by: Olav.NET | last post by:
I am a .NET/C++ developer who is supposed to do some work with Access. I do not know much about it except for the DB part. Questions: *1* I am looking for INTENSIVE books to get quickly up to...
64
by: John | last post by:
Hi What future does access have after the release of vs 2005/sql 2005? MS doesn't seem to have done anything major with access lately and presumably hoping that everyone migrates to vs/sql. ...
1
by: com | last post by:
Extreme Web Reports 2005 - Soft30.com The wizard scans the specified MS Access database and records information such as report names, parameters and subqueries. ......
17
by: Mell via AccessMonster.com | last post by:
Is there a way to find out where an application was created from? i.e. - work or home i.e. - if application sits on a (work) server/network, the IT people know the application is sitting...
37
by: jasmith | last post by:
How will Access fair in a year? Two years? .... The new version of Access seems to service non programmers as a wizard interface to quickly create databases via a fancy wizard. Furthermore, why...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.