473,385 Members | 1,347 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,385 software developers and data experts.

ASP - DNS - Run Time Error

Hi,
Ive got a web site hosted on Seem (www.seem.co.uk)
it allows 1 Access Database and you can connect via DSN

I have a message that scrolls across the top of the page,
it can work, refresh, work, refresh, fail, refresh, work, etc etc
I dont have any control of the permissions, web server etc
just my code and database file.
I can see any reason why it will work 4 out of 5 times.
Any thoughts ?

To open the database I use:-
Open Data (Include) Page:-
<%
Set cnn = Server.Createobject("ADODB.Connection")
cnn.open "DSN=gtr"
session.lcid=2057
%>

The error message:-
Error Type:
(0x80020009)
Exception occurred.
/gtr/main_scroll.asp, line 15

Scroll Page Code :-
<marquee direction='left' delay=100>
<%
dim MyMsg
set rsTable=server.createobject ("adodb.recordset")
sql="Select * from CarStock where carstatus=0"
rsTable.open sql,cnn,3,3
if rsTable.eof=false then
rsTable.movelast
RecCount=rsTable.recordcount
Randomize(timer)
MyNum=Int(Rnd * RecCount) + 1
rsTable.movefirst
rsTable.move(MyNum)
MyMsg="<div id='ScrollMessage'><BR>"
MyMsg=MyMsg & rsTable("Make") & ", " <----------- Line 15
MyMsg=MyMsg & rsTable("Model") & " , "
MyMsg=MyMsg & rsTable("RegLetter") & ", "
MyMsg=MyMsg & rsTable("Reg") & ", "
MyMsg=MyMsg & "£" & formatnumber(rsTable("Sell"),2) & ", "
MyMsg=MyMsg & "Colour:" & rsTable("Colour") & ", "
MyMsg=MyMsg & "Mileage:" & rsTable("Mileage") & ", "
MyMsg=MyMsg & rsTable("SellNotes")
MyMsg=MyMsg & "</div>"
response.write MyMsg
else
Response.write ". . . please call for a full stock list . . ."
end if
rsTable.close
set rsTable=Nothing
%></marquee>
Nov 9 '06 #1
2 1433
"MadMike42" <mi****@ntlworld.comwrote in message
news:dX******************@newsfe6-gui.ntli.net...
Hi,
Ive got a web site hosted on Seem (www.seem.co.uk)
it allows 1 Access Database and you can connect via DSN

I have a message that scrolls across the top of the page,
it can work, refresh, work, refresh, fail, refresh, work, etc etc
I dont have any control of the permissions, web server etc
just my code and database file.
I can see any reason why it will work 4 out of 5 times.
Any thoughts ?

To open the database I use:-
Open Data (Include) Page:-
<%
Set cnn = Server.Createobject("ADODB.Connection")
cnn.open "DSN=gtr"
session.lcid=2057
%>

The error message:-
Error Type:
(0x80020009)
Exception occurred.
/gtr/main_scroll.asp, line 15

Scroll Page Code :-
<marquee direction='left' delay=100>
<%
dim MyMsg
set rsTable=server.createobject ("adodb.recordset")
sql="Select * from CarStock where carstatus=0"
rsTable.open sql,cnn,3,3
if rsTable.eof=false then
rsTable.movelast
RecCount=rsTable.recordcount
Randomize(timer)
MyNum=Int(Rnd * RecCount) + 1
rsTable.movefirst
rsTable.move(MyNum)
MyMsg="<div id='ScrollMessage'><BR>"
MyMsg=MyMsg & rsTable("Make") & ", " <----------- Line 15
MyMsg=MyMsg & rsTable("Model") & " , "
MyMsg=MyMsg & rsTable("RegLetter") & ", "
MyMsg=MyMsg & rsTable("Reg") & ", "
MyMsg=MyMsg & "£" & formatnumber(rsTable("Sell"),2) & ", "
MyMsg=MyMsg & "Colour:" & rsTable("Colour") & ", "
MyMsg=MyMsg & "Mileage:" & rsTable("Mileage") & ", "
MyMsg=MyMsg & rsTable("SellNotes")
MyMsg=MyMsg & "</div>"
response.write MyMsg
else
Response.write ". . . please call for a full stock list . . ."
end if
rsTable.close
set rsTable=Nothing
%></marquee>
Assume you have 10 records.
Assume also that MyNum = 10.
Now MoveFirst.
Which record are you at?
Record 1.
Now .move(myNum) [10 places]
Which record are you pointing at now?
Now try to read a value from Record 11.

Exception ocurred.

--
Mike Brind
Nov 10 '06 #2
Doh !
Never thought of that
Thanks
Mike.

"Mike Brind" <us********@smap.comwrote in message
news:uC**************@TK2MSFTNGP02.phx.gbl...
"MadMike42" <mi****@ntlworld.comwrote in message
news:dX******************@newsfe6-gui.ntli.net...
>Hi,
Ive got a web site hosted on Seem (www.seem.co.uk)
it allows 1 Access Database and you can connect via DSN

I have a message that scrolls across the top of the page,
it can work, refresh, work, refresh, fail, refresh, work, etc etc
I dont have any control of the permissions, web server etc
just my code and database file.
I can see any reason why it will work 4 out of 5 times.
Any thoughts ?

To open the database I use:-
Open Data (Include) Page:-
<%
Set cnn = Server.Createobject("ADODB.Connection")
cnn.open "DSN=gtr"
session.lcid=2057
%>

The error message:-
Error Type:
(0x80020009)
Exception occurred.
/gtr/main_scroll.asp, line 15

Scroll Page Code :-
<marquee direction='left' delay=100>
<%
dim MyMsg
set rsTable=server.createobject ("adodb.recordset")
sql="Select * from CarStock where carstatus=0"
rsTable.open sql,cnn,3,3
if rsTable.eof=false then
rsTable.movelast
RecCount=rsTable.recordcount
Randomize(timer)
MyNum=Int(Rnd * RecCount) + 1
rsTable.movefirst
rsTable.move(MyNum)
MyMsg="<div id='ScrollMessage'><BR>"
MyMsg=MyMsg & rsTable("Make") & ", " <----------- Line 15
MyMsg=MyMsg & rsTable("Model") & " , "
MyMsg=MyMsg & rsTable("RegLetter") & ", "
MyMsg=MyMsg & rsTable("Reg") & ", "
MyMsg=MyMsg & "£" & formatnumber(rsTable("Sell"),2) & ", "
MyMsg=MyMsg & "Colour:" & rsTable("Colour") & ", "
MyMsg=MyMsg & "Mileage:" & rsTable("Mileage") & ", "
MyMsg=MyMsg & rsTable("SellNotes")
MyMsg=MyMsg & "</div>"
response.write MyMsg
else
Response.write ". . . please call for a full stock list . . ."
end if
rsTable.close
set rsTable=Nothing
%></marquee>

Assume you have 10 records.
Assume also that MyNum = 10.
Now MoveFirst.
Which record are you at?
Record 1.
Now .move(myNum) [10 places]
Which record are you pointing at now?
Now try to read a value from Record 11.

Exception ocurred.

--
Mike Brind

Nov 10 '06 #3

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

Similar topics

18
by: Ken | last post by:
Hi. Can anyone refer me to any articles about the compatibility between c++ polymorphism and real-time programming? I'm currently on a real-time c++ project, and we're having a discussion...
5
by: Carmine Cairo | last post by:
Hi, I'm working on a project and today I've note a little problem during the compile fase. Here a little piece of code: // 1st version welldone = 0; size = p->getSize(); backbone = new...
4
by: Christaaay | last post by:
I have been using the code below successfully for almost a year. yesterday, I began getting a run time error 6 (overflow). I am using the code in an Access 2000 database. Can anyone help me...
1
by: MLH | last post by:
I want to change my system time date each time an A97 app is started. Here's how I've been doing it. Am looking for a better way. Sure some of you have researched this. Function...
1
by: Mark | last post by:
I have .aspx code-behinds that inherit from the class below. The code runs just fine, but the form designer bombs at design time when trying to view the .aspx page in VS.NET 2003. If I comment...
1
by: Alfonso Morra | last post by:
Hi I'm compiling some code and need to generate some random numbers. To save time, I decided to use the srand, rand and time functions. My code worked (atleast built fine) until I added time.h,...
4
by: HNguyen | last post by:
Hi, I have a Web application in ASP.NET. My Application allows the users upload files into the server after checking their user names and passwords. For each transaction, the Web program will...
15
by: Khurram | last post by:
I have a problem while inserting time value in the datetime Field. I want to Insert only time value in this format (08:15:39) into the SQL Date time Field. I tried to many ways, I can extract...
9
by: ThunderMusic | last post by:
Hi, I'd like to create a compile time error in my class... maybe there's a way already built in in the framework so I can achieve what I want... I have 2 constructors in my class. One of them...
4
by: ahmurad | last post by:
Dear Xperts, In my database table some fault code type records are inserted and the values are like bellows: Error:2/FC:10; 00:15:13 16/03/2009; Error:2/FC:20; 00:15:15 16/03/2009; ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...

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.