473,407 Members | 2,359 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,407 software developers and data experts.

Error while connecting to MsAccess 2000 via ASP.NET

I am trying to connect to MsAccess 2000 database using ASP.NET. The code snippet is attached below. In the select statement, when I use a *, I get the values and they are populated in the drop down list. But when I use the specific column name, EMP_NAME, the page errors out

Dim comm As New OleDb.OleDbCommand
Dim strConnection As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inetpub\wwwroot\Khajanchi\mdbConnect.mdb "
Dim cn As OleDbConnection = New OleDbConnection(strConnection)

Try
cn.Open()
Dim odr As OleDb.OleDbDataReader
comm.Connection = cn
comm.CommandType = CommandType.Text
comm.CommandText = "SELECT * FROM EMP"
odr = comm.ExecuteReader()
ddlSource.DataTextField = "EMP_NAME"
ddlSource.DataSource = odr
ddlSource.DataBind()
Catch err As Exception
Response.Write(err.Source)
Response.Write(err.Message)
End Try

When EMP_NAME is used in the select statement, the page errors out with

Response.Write(err.Source) = Microsoft JET Database Engine
Response.Write(err.Message) = Unknown

I upgraded MDAC to ver. 8.0, but the error remains.
Please advise
Thaniks
--
Ash - forum member
http://www.visual-basic-data-mining.net/forum
Nov 18 '05 #1
0 1114

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

Similar topics

0
by: Kong Li | last post by:
Follow up to this thread, the latest Oracle 9i release 2 patchset (9.2.0.5) fixed the handle count leak problem. The problem is in Oracle client component. Thanks. Kong ----- From: Kong...
2
by: Chris | last post by:
I recieve unrecognized database format when trying to open a MSAccess 2003 database with MSAccess 2000. I only need it to open as read-only. Why won't it open my database?
9
by: Tim D | last post by:
Hi, I originally posted this as a reply to a rather old thread in dotnet.framework.general and didn't get any response. I thought it might be more relevant here; anyone got any ideas? My...
4
by: Pieter | last post by:
Hi, I have some nasty error when deploying my application (VB.NET 20002) on the users-computers. I'm using an SQL 2000 database. The problem I guess is the fact that I had a local SQL 2000...
7
by: deltalimagolf | last post by:
I now get the following error message after copying an asp.net application to the deployment web server. I don't have SQLExpress or any version of SQL 2005 installed. I found the "LocalSQLServer"...
3
by: Ann Marinas | last post by:
Hi there, I am currently developing an ASP.NET program that connects to a SQL Server 2000 database. I also have SQL Server 2005 Express installed on the same local machine. Prior to...
11
by: Yelena Varshal via AccessMonster.com | last post by:
Hello, I have a problem with one of msaccess.exe API calls that work on my desctop but does not work on the laptop from within MS ACCESS. There is a lot of differences between 2 computers...
0
by: Justin.davies4 | last post by:
Hi, A user on windows 2000 has encountered an error whilst accessing a msaccess 97 database 'the instruction at xxxxx referenced memory at xxxxx. the memory could not be written. The 4 people...
5
by: Alan Silver | last post by:
Hello, Server configuration: Windows 2003 Server SP2 SQL Server 2000 SP4 ..NET v2.0.50727 just built up a new server using the same configuration as my current one. I even used the same CDs...
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: 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?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.