473,387 Members | 1,483 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.

ASP.NET app: Server Error in '/LibrarySite' Application.

Dököll
2,364 Expert 2GB
Hey Gang!

What do you make of this error:


Server Error in '/LibrarySite' Application.
--------------------------------------------------------------------------------

Conversion from type 'Field' to type 'String' is not valid.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidCastException: Conversion from type 'Field' to type 'String' is not valid.

Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

<%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

Stack Trace:


[InvalidCastException: Conversion from type 'Field' to type 'String' is not valid.]
Microsoft.VisualBasic.CompilerServices.Conversions .ToString(Object Value) +625
ASP.mysendform_aspx.Button2_Click(Object sender, EventArgs e) +309
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +75
System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument) +97
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4921




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832
I am attempting to read an Access Table, while all seems well in the code, looks like it is asking me to format form fields, what are your thoughts:

Expand|Select|Wrap|Line Numbers
  1. Please forgive, I am still working with the code, I have not commented 
  2.  
  3.         Dim MyConn, MyPath, RecSet, SequelQuery
  4.         MyPath = "C:\Data_Central.mdb"
  5.         MyConn = CreateObject("ADODB.Connection")
  6.         MyConn.Open("PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & MyPath)
  7.         SequelQuery = "SELECT * FROM Library1 WHERE ItemName LIKE '" & TextBox1.Text & "'"        
  8. RecSet = MyConn.Execute(SequelQuery)
  9.         Do While Not RecSet.EOF
  10.             TextBox1.Text = RecSet.fields("ItemName")
  11.             TextBox2.Text = RecSet.fields("Type")
  12.             TextBox3.Text = RecSet.fields("EmailAddress")
  13.             RecSet.MoveNext()
  14.         Loop
  15.         MyConn.Close()
  16.  
  17.  
Seems the only thing stopping me from see good descent data is that error. I have since modified Access database fields to text to correspond somehow to the textboxes on form. I suspect the error is referring to something else, just can quite put my finger on it.

Any input you have, direction is helpful. Thanks!

Have a great week:-)

Dököll
Jan 14 '08 #1
0 1027

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: Ann Marinas | last post by:
Hi all, I would like to ask for some help regarding separating the asp.net webserver and the sql server. I have created an asp.net application for a certain company. Initially, we installed...
9
by: Ron | last post by:
my application is throwing an exception error when closing if I run a procedure in the app. I can't even trap the error with try/catch ex As Exception. Is there a way to completely shut down the...
5
by: snicks | last post by:
I'm trying to exec a program external to my ASP.NET app using the following code. The external app is a VB.NET application. Dim sPPTOut As String sPPTOut = MDEPDirStr + sID + ".ppt" Dim p As...
1
by: Michael | last post by:
Hi Everyone, I just put a app on a server that is already running sharepoint. The admin had put the app under the c:\Inetpub\wwwroot\PurchaseOrder dir. When I try and run the app I get the...
5
by: Arthur Dent | last post by:
Hello all.... i am having a very frustrating problem, because it has KILLED my website, and i cant seem to get it working again. I have an ASP.NET 2.0 site, which worked without any problems a...
0
by: emu | last post by:
Hi All, I have an unmanaged C++ application that references a mixed mode image DLL (mixed managed and unmanaged). Under .NET 1.1 we could trust the dll (the mixed mode dll) by running the...
5
by: Tony | last post by:
Hi all, Here's the link to the issue we were seeing on our ASP.NET system when modifying, adding and deleting directories in framework 2.0....
2
by: kmsuzuki | last post by:
I have a Windows Server 2003 + IIS6 with both .Net 1.1 and 2.0 installed. In the past, I've had no problems using the ASP.NET tab in the IIS Manager to specify which framework version a given...
6
by: =?Utf-8?B?RGF2ZQ==?= | last post by:
I'm running VS 2003/ASP.NET 1.1.4322.0 on XP SP2 All of a sudden I started to getting... "Error while trying to run project: Unable to start debugging on the web server. Server side-error...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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.