473,773 Members | 2,269 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

The information is not writing to muy array in ASP

HI there,
I really hope you can help as this is driving me mad!

I am trying to set up a calender on my site for events and found a
neat looking script. All works except the events aren't being writting
to the array. The code section i think is important is below

***********
sql = "SELECT id, startDate, endDate, name FROM calendarEvent " & _
"WHERE ((startDate >= #" & searchStart & "# AND endDate <= #" &
searchEnd & "#) " & _
"OR (startDate < #" & searchStart & "# AND endDate >= #" &
searchStart & "# AND endDate <= #" & searchEnd & "#) " & _
"OR (startDate <= #" & searchEnd & "# AND startDate >= #" &
searchStart & "# AND endDate > #" & searchEnd & "#) " & _
"OR (startDate < #" & searchStart & "# AND endDate > #" & searchEnd
& "#)) "
if trim(eventType) = "" then
'ignore it
elseif cint(eventType) = 1 then
sql = sql & "AND eventType = 1"
elseif cint(eventType) = 2 then
sql = sql & "AND eventType = 2"
elseif cint(eventType) = 3 then
sql = sql & "AND eventType = 3"
elseif cint(eventType) = 4 then
sql = sql & "AND eventType = 4"
else
'ignore it
end if
Set rs_getEvent = cn_Connection.E xecute(sql)
%><%response.wr ite("sql = " & sql & "<br>")%><%
sql = ""
sql = "SELECT id, eventType FROM eventType"
Set rs_getType = cn_Connection.E xecute(sql)

curDate = searchStart
for x = 1 to day(searchEnd)
redim preserve eventID(x)
redim preserve eventName(x)

if not rs_getEvent.BOF then rs_getEvent.mov efirst
while not rs_getEvent.EOF
x1 = rs_getEvent("st artDate")
x2 = rs_getEvent("en dDate")
if x1 = curDate OR x2 = curDate OR (x1 < curDate AND x2 > curDate)
then
'make a list for event for each day
eventID(x) = eventID(x) & rs_getEvent("id ") & "~||~"
eventName(x) = eventName(x) & rs_getEvent("na me") & "~||~"
end if
rs_getEvent.mov enext
wend
%><%response.wr ite("<b>eventNa me("&x&") =
"&eventName(x)& "</b><br><br>")%>< %'eventName(x)
'move current day to next day
curDate = dateAdd("d", 1, curDate)
next

'check if date is in this month
if dateFormat = 1 then
if Not month(DateAdd(" d", curDay-1, curMonth & "/1/" & curYear)) =
cint(curMonth) then curDay = 1
lastDay = day(dateserial( curYear, curMonth+1, 1-1))
today = curMonth & "/" & curDay & "/" & curYear
else

if Not month(DateAdd(" d", curDay-1, "1/" & curMonth & "/" &
curYear)) = cint(curMonth) then curDay = 1
lastDay = day(dateserial( curYear, curMonth+1, 1-1))
today = curDay & "/" & curMonth & "/" & curYear
end if
%>

********

Can anyone see anything why this would be happning - if you need more
information then i can email you all the code... it runs of a two
table database.

I really hope you can help..

Vicky
Jul 19 '05 #1
0 1420

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

Similar topics

5
5565
by: rob | last post by:
hey every1, I've got alot of data to write out to file and it's all just 1's and 0's. It's all stored in 2 dimensional arrays of width 32 and varying height. At the moment it's all just integer arrays and the individual 1's and 0's are being written out as integers.
5
2193
by: Amir S. | last post by:
Hi, I'm a newbie to C++ (2 weeks into the course). We were given this assignment to write some code that reads a set of integers (grades) from a file (filename passed by console), outputs them in reverse order, calculates and prints their average. => We have been told that we need to make sure that our code meets "information hiding" guidelines. Could anyone help me get started with this (any ideas?)
42
3210
by: Dan | last post by:
Hello, I have trouble with class calling. I am calling getvolume() with succes in the function CreateCircle but it do not want to call it in ShowCircle() function. I am staying in the same class. I thought that was the point of encapsulation. When the function ShowCircle() is called I get very large number -1.07374e+008 can anyone help me ?
2
6860
by: melanieab | last post by:
Hi, I'm trying to store all of my data into one file (there're about 140 things to keep track of). I have no problem reading a specific string from the array file, but I wasn't sure how to replace just one item. I know I can get the entire array, then save the whole thing (with a for loop and if statements so that the changed data will be saved), but it seems like a lot of unnecessary reading and writing. Is there a way to directly save...
2
6793
by: simonc | last post by:
Is there an easy way of writing a number in 32 bit integer format into four bytes of a file? I am experimenting with FilePut but I can only make it work by defining a four byte array and doing some simple calculations to work out from my integer what the individual values of the four bytes have to be. Surely there must be a short cut to doing this? And are there also any existing routines for converting a floating point number into...
6
5273
by: arne.muller | last post by:
Hello, I've come across some problems reading strucutres from binary files. Basically I've some strutures typedef struct { int i; double x; int n; double *mz;
4
2560
by: Drew | last post by:
This might beyond the scope of this group because it deals with SharePoint, but I'm not sure if I can't get it to work because of SharePoint or because JavaScript is weird (I don't have much experience with JavaScript). Anyway, here is the code i'm working with. Basically, it creates appends a hidden IFrame to the page, gets the links from the IFrame, and displays those which have the "OnLink" property. The weird thing is that when I...
10
2312
by: deciacco | last post by:
I'm writing a command line utility to move some files. I'm dealing with thousands of files and I was wondering if anyone had any suggestions. This is what I have currently: $arrayVirtualFile = array( 'filename'=>'filename', 'basename'=>'filename.ext', 'extension'=>'ext', 'size'=>0,
7
2938
by: w1ck3d64 | last post by:
hi, i have an array of pixel information which i want to display with C/C++. I'm trying to use OpenCV at the moment but I don't have much experience writing pixel by pixel. Can someone show me a way to do it? thanks!
0
9454
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10264
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10106
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10039
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8937
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7463
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6717
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4012
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2852
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.