User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 397,590 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,949 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 8124 | Replies: 3
Reply
Join Date: Jul 2005
Posts: 12
Reputation: ozeona is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
ozeona's Avatar
ozeona ozeona is offline Offline
Newbie Poster

An unhandled exception occurred during the execution of the current web request.

  #1  
Jul 7th, 2005
hi im a newbie in asp.net(learn 2 days ago) n still havent fully grasp the concept of asp.net yet. I ran into some problems here but i dunno what is it.
i've tried looking at the other post but could not really find the error in mine .Can you please guide me?

<%@ Import nameSpace = "System.Data" %>
<%@ Import NameSpace="System.Data.ODBC" %>

<script language="VB" runat="Server">

Sub page_Load(Sender as Object, E as EventArgs)

if not ispostback Then

Dim ConODBC As OdbcConnection 
Dim cmdSelect as OdbcCommand
Dim dtrworks As OdbcDataReader

Dim connStr, sql as String
connStr ="Driver={MySQL ODBC 3.51 Driver};server=192.168.2.14;Port=3306; DATABASE=vome; option=0"
ConODBC = New OdbcConnection(ConnStr)
conODBC.Open()


cmdSelect = New OdbcCommand( "SELECT * FROM worklist", conODBC)
dtrworks = cmdSelect.ExecuteReader()




linklist.DataSource = dtrworks
linklist.DatatextField = "img_title"
linklist.DatavalueField = "img_link"
linklist.DataBind()

dtrWorks.Close()

Dim profile
profile.DataSource = dtrworks
profile.DataTextField = "img_name"
profile.DataTextField = "img_age"
profile.DataTextField = "img_sch"
profile.DataBind()


dtrWorks.Close()
conODBC.Close
End If

End Sub

</script>
<html>

<head>
<title> Trial Test</title></head>
<body>
<form id="form1" runat="server">
<table>
<tr>
<td>

<font size =11>
 
 
<asp:listbox autopostback="true" BackColor="#CCCCCC" Font-Name="Arial" Font-Size="10" ForeColor="#FFFFFF" id="linklist" Rows="3" runat="server" SelectionMode="single"></asp:listbox>

<br>
<asp:textBox id="Profile" readonly="true" dir="ltr" runat="server">
</asp:textBox>


</font>

</td>
</tr>
</table>
</form>
</body>
</html>

pardon the codes i cannot find the textbox to put the codes in.

Thanks
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2003
Location: Canada
Posts: 786
Reputation: Paladine has a spectacular aura about Paladine has a spectacular aura about Paladine has a spectacular aura about 
Rep Power: 9
Solved Threads: 25
Colleague
Paladine's Avatar
Paladine Paladine is offline Offline
Master Poster

Re: An unhandled exception occurred during the execution of the current web request.

  #2  
Jul 8th, 2005
Well first off you close the dtrworks and then call it two lines later. And you dim profile as nothing?

...
dtrWorks.Close()

Dim profile
profile.DataSource = dtrworks
profile.DataTextField = "img_name"
profile.DataTextField = "img_age"
profile.DataTextField = "img_sch"


profile.DataBind()
Assistant Manager, Regional Pharmacy Information Systems
TLC Services Website (Under Construction)
Updated : ASP.Net Login Code
Reply With Quote  
Join Date: Jul 2005
Posts: 12
Reputation: ozeona is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
ozeona's Avatar
ozeona ozeona is offline Offline
Newbie Poster

Re: An unhandled exception occurred during the execution of the current web request.

  #3  
Jul 8th, 2005
hm.. yea... looks like im doing it in a java way.

btw, is there a way to click on the itemlist den other info from the database (including text and flash file links) to display on the same page?
Reply With Quote  
Join Date: Feb 2003
Location: Canada
Posts: 786
Reputation: Paladine has a spectacular aura about Paladine has a spectacular aura about Paladine has a spectacular aura about 
Rep Power: 9
Solved Threads: 25
Colleague
Paladine's Avatar
Paladine Paladine is offline Offline
Master Poster

Re: An unhandled exception occurred during the execution of the current web request.

  #4  
Jul 8th, 2005
Yes.

If it is in the DB, you can display it in ASP.Net. How you want to, is up to you.

Logic and programmatic pseudo-code it to determine when you want to fire a particular event to display and how you want to display it.

Good Luck
Originally Posted by ozeona
hm.. yea... looks like im doing it in a java way.

btw, is there a way to click on the itemlist den other info from the database (including text and flash file links) to display on the same page?
Assistant Manager, Regional Pharmacy Information Systems
TLC Services Website (Under Construction)
Updated : ASP.Net Login Code
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb ASP.NET Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 6:00 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC