Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / February 2008

Tip: Looking for answers? Try searching our database.

access db via asp.net

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
segue - 06 Feb 2008 03:42 GMT
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()
Manish - 06 Feb 2008 09:09 GMT
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

> I'd greatly appreciate suggestions on a better method for cursing through
> access database tables or why I'm getting the following error at
[quoted text clipped - 15 lines]
>             'oleDataAdapter = New oledataadapter
>             oleConnection.Open()
Michael Nemtsev [MVP] - 06 Feb 2008 09:13 GMT
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/library/aa288452(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

s> I'd greatly appreciate suggestions on a better method for cursing
s> through access database tables or why I'm getting the following error
s> at oleConnection.Open().
s>
s> Do I need an odbc syntax instead of oledb?
s> Much thanks.
s> System.Data.OleDb.OleDbException: The database has been placed in a
s> state on machine 'IO' that prevents it from being opened or locked.
s>
s> Dim olestring As String =
s> "Provider=Microsoft.Jet.OLEDB.4.0;Data
s> Source=c:\db\db2000_1_client.mdb"
s> Dim qstring As String = "SELECT * FROM " & aTable & ""
s> Try
s>
s> oleConnection = New OleDbConnection(olestring)
s> 'oleDataAdapter = New oledataadapter
s> oleConnection.Open()
segue - 06 Feb 2008 18:20 GMT
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 & ""

> Hello segue,
>
[quoted text clipped - 29 lines]
> s> 'oleDataAdapter = New oledataadapter
> s> oleConnection.Open()
segue - 06 Feb 2008 20:11 GMT
Please disregard I figured it out by making a database connection with
visual studio and using the wizards to create functional queries.

Thanks.

> Thank you for your responses.
>
[quoted text clipped - 42 lines]
> > s> 'oleDataAdapter = New oledataadapter
> > s> oleConnection.Open()

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.