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

*** HELP *** Problems Accessing Simple VB.NET Access Database


1) I have a .NET Web Application called "Lesson18b" under
"C:\Inetpub\wwwroot\Lesson18b".

2) I have one Web Form on this Lesson called "Form18b.aspx"

3) In this same Folder under Inetpub I have the famous NorthWinds
Access Database called "FPNWIND.MDB"

4) I add an OleDBConnection called OleDBConnection1. I set the "New
Connection" Properties to: Provider is "Microsoft Jet 4.0 OLE DB
Provider". Database Name is "FPNWIND.MDB". User name is
"Admin". Blank Password is checked. I test the connection and it
states that the "Test Connection Succeeded". I choose not to
include a password in the connection string.

5) I then add an OleDBCommand called OleDBCommand1. I set the
connection to OleDBConnection1. For the command text I select the
"..." and when asked, I add table "Customers". I move "All
Columns" to the grid below, producing the SQL "SELECT
Customers.* FROM Customers". When I right click the bottom
grid and choose "Run", it fills the grid with data. So far, so
good.

6) Back on the form Form18.aspx I add a text field called
"txtResults" and a command button called "Button1".

7) Double-clicking on "Button1", I add the following lines of
code:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim dr As OleDb.OleDbDataReader
OleDbConnection1.Open()
dr = OleDbCommand1.ExecuteReader
While dr.Read
txtResults.Text = dr.GetValue(0)
End While
End Sub

8) When I build, then run the application, and click on "Button1",
I get the following error:

We can't find http://localhost/Lesson18b/Form18b.aspx
Error - Internal server error

9) If I debug the application, it bombs on the following line in
Button1:

OleDbConnection1.Open()
I'm trying to get the data to display on txtResults. This code works
fine in a regular VB App...but for some reason it will not work on this
Web VB App.

Does anyone have any ideas on why this is happening?

Jul 29 '06 #1
0 840

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

Similar topics

2
by: Jon Dellaria | last post by:
I have been using MySql as the database using JSP's and JavaBeans but recently I have wanted to start using the database connection pooling mechanism built into TomCat. I think I am having a...
1
by: Brad Pears | last post by:
Our graphic designer is developing our new company website. We have switched providers and currently she is working on the new website which currently ressides on the new providers server as they...
3
by: Scott Castillo | last post by:
Is it possible to access an SQL Server database from a Javascript client? I know you can transfer variables from middleware to Javascript client, but was wondering if you can directly access...
1
by: James Bird | last post by:
Hello In order to perform a hetrogeneous join (I think that's what they're called) between MySQL and another database, I've created an Access database containing linked tables from each...
2
by: DanB | last post by:
I am using VB DotNet Std Edition and am writing a web application that needs to read and write to an password protected database. The mdb files reside in a folder (fpdb) under the localhost...
4
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The...
1
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The...
4
by: Nijazi Halimaji | last post by:
Hi newsgroup I have some problems with my service which is using ODBC-Connections. My service is executed as a local system (I tried already every other account type, even the domain-admin) ...
5
by: samadams_2006 | last post by:
I'm having a problem in accessing a Microsoft Access Database in a VB.NET Web Application. It's so straight forward, I thought I'd walk you through all the details here: 1) I have a .NET Web...
4
by: ThePhenix | last post by:
Hi everybody, I have recently been doing a conversion for my boss for a access 2000 database (both front and backend) to a MSSQL backend. I finished the conversion today (as quite a lot of the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.