473,461 Members | 1,917 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Data table displays locally but "Could Not Start Session" on server?

This was working ok but I changed something and I don't know where but
it's no longer working. I get "Could Not Start Session" error. I'm
sure it's something obvious but this is my first stab at .net. Any
help would be appreciated!

Lisa

Here is the live link and the error:
http://www.noefc.info/events_calendar2.aspx

Here is the SOURCE:

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Page Language = "VB" debug = "true" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>
<%@ Import Namespace="System.Xml" %>
<script runat="server">

Dim ds As DataSet = New DataSet()
Protected Sub Page_Load(ByVal Src As Object, ByVal E As EventArgs)
Dim connectionstring As String =
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+
Server.MapPath("data/noefc.mdb") +";"
Dim sql As String = "select * from events"

Dim da As OleDbDataAdapter = New
OleDbDataAdapter(sql,connectionstring)
da.Fill(ds, "events")

End Sub

public sub eventscalendar_DayRender(s as object, e as
DayRenderEventArgs)

Dim strEvents As StringBuilder = New StringBuilder()
strEvents.Append("<span style=""font-size:80%"">")
Dim dsrow As DataRow
Dim row As DataRowView
For Each dsrow In ds.Tables("events").Rows
Dim eventdate As DateTime = CType(dsrow("start_date"), DateTime)
Dim eventID AS string = dsrow("eventID")
If eventdate.Equals(E.Day.Date) Then
If IsDBNull(dsrow("start_time")) Then
strEvents.Append("<br /><br />" + dsrow("start_time") +
"<a href='event_update.aspx'>"+ dsrow("eventTitle")+"</a>")
Else
strEvents.Append("<br /><br />" + (CType(dsrow("start_time"),
DateTime)).ToString("t") + "<br /><a href='event_detail.asp?varID="
+eventID +"' target='_blank'>" + dsrow("eventTitle")+"</a>")
End If
end if
Next

strEvents.Append("</span>")
E.Cell.Controls.Add(New LiteralControl(strEvents.ToString()))
end sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Event Calendar</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/>
</head>
<body>
<form runat="server">
<asp:calendar BackColor="#FFFFFF" BorderColor="#00CCFF"
BorderStyle="groove" CellPadding="2" DayHeaderStyle-BackColor="#00CCFF"
DayStyle-HorizontalAlign="right" DayStyle-VerticalAlign="top"
Font-Name="verdana" Font-Names="arial" Font-Size="10" Height="600"
ID="eventcalendar" runat="server" ShowGridLines="true"
TitleStyle-BackColor="#0000FF" TitleStyle-Font-Size="14"
TitleStyle-ForeColor="#FFFFFF" TodayDayStyle-BackColor="#66CCFF"
TodayDayStyle-BorderColor="#FFFFCC" TodayDayStyle-ForeColor="#0000CC"
Width="950"
OnDayRender="eventscalendar_DayRender"></asp:calendar></asp:calendar>
</form>

</body>
</html>

Nov 19 '05 #1
0 1313

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

Similar topics

9
by: bajopalabra | last post by:
hi session("myVar") = rs.getRows( ) don't work when number of records is greater than 10 does anybody know WHY ??? is it a Session object limitation ??? thanks
7
by: Ottar | last post by:
I've made a program sorting incomming mail in public folder. The function runs every minute by using the form.timer event. In Access XP it runs for weeks, no problem. Access 2003 runs the same...
4
by: VB Programmer | last post by:
If I have a variable I want to share in my application what is the difference between just declaring a variable (Dim strMyVar as String) and using a session variable (Session("strMyVar"))? When...
3
by: Jeff Smythe | last post by:
I simply want to execute some code once when a new session of my ASP.NET application is started (I'm not using session state for anything else - just writing some data to a database). I thought...
1
by: Bill Cohagan | last post by:
We are attempting to convert an already existing application over to using multiple worker processes; thus we need to store state via session state server rather than in process. Since this app...
1
by: Axel Dahmen | last post by:
Hi, today I've had a strange DTS error: In one of my transformations I'd been using several Copy Column transformations + one ActiveX transformation using a lookup function. This lookup function...
10
by: thomson | last post by:
Hi, i create a session variable in C# as follows Session , but iam not able to access the variable in VB.net like intmode=Session("var"); Why is that ? Regards
4
by: R.A.M. | last post by:
Hello, I am writing ASP.NET application in which I need to use User Profiles and Session mechanisms. Here I include part of my source code (Admin.cs): using System; using System.Data; using...
2
by: gggram2000 | last post by:
//When cbxInvNum is changed, it will display all fields on dgDisplay datagrid from SaleReceipts Table where invoice number = to the selected invoice number string sql = "SELECT * WHERE InvoiceNumber...
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:
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
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...
1
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
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.