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

Microsoft VBScript runtime error '800a000d'

I have started to have problems with my code. On one server the code works fine and on another (which is the one I need to run the scrpt on) I get

Microsoft VBScript runtime error '800a000d'

Type mismatch

/ops/eus/clrm/ck_avail.asp, line 243

The code is:

if dbperiod>1 then
dim dys(90)
for a=0 to dbperiod
dys(a) = DateAdd("d", a, out)
REM response.write("dates loaded in the days array " & dys(a))%><!--<br>--><%
REM response.write("ttime in db " & ttime)%><!--<br>--><%
Next
Feb 26 '08 #1
4 4658
CroCrew
564 Expert 512MB
Hello ghanson,

The code that you posted might be the problem. From what you posted it is incomplete code. Where is line 243? Below is some error trapping that could help ya. But without the complete block of code around line 243 to see this will be hard to solve. Please post more code so we can give better help/advice.

Hope this helps~

Expand|Select|Wrap|Line Numbers
  1. <%
  2.     If Not (IsNumeric(dbperiod)) Then
  3.         Response.Write("Error: The value for 'dbperiod' is not a numeric value!")
  4.         Response.End()
  5.     End If
  6.  
  7.     If Not (IsDate(out)) Then
  8.         Response.Write("Error: The value for 'out' is not in a date format!")
  9.         Response.End()
  10.     End If
  11.  
  12.     If (dbperiod > 1) Then
  13.         dim dys(90)
  14.         For a=0 to dbperiod
  15.             dys(a) = DateAdd("d", a, out)
  16.         Next
  17.     End If
  18. %>
  19.  
Feb 26 '08 #2
Sorry, I ment to include that. The code is part of a classroom reservation system. This particular portion is designed to check to see if the classroom is available on the day and time specified.

Here is the code. The type mismatch is on line 243

155 Set reserve=Server.CreateObject("ADODB.Recordset")
156 reserve.open "SELECT * FROM reserve WHERE ref=" & id & "", "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=c:/users/ClassRmCal/classrooms.mdb"
157
158 <!-- " -->
159 Do WHILE NOT reserve.EOF
160
161 out=reserve("ADate")
162 ind=reserve("BDate")
163
164 ttime=reserve("thetime")
165
166 dbperiod = DateDiff("y", out, ind)
167
168
169 if dbperiod=0 then
170
171 interval=DateDiff("y", out, ADate)
172
173 if interval=0 then
174 If thetime="Day" THEN
175 available="no"
176 Exit Do
177 End If
178 If ttime="Day" THEN
179 available="no"
180 Exit Do
181 End If
182 If thetime=ttime THEN
183 REM response.write("x= " & x & "resp= " & resp & thetime & " " & ttime)
184 available="no"
185 Exit Do
186 End If
187
188 Else
189 available="yes"
190
191 end if
192
193 end if
194
195 if dbperiod=1 then
196
197 interval=DateDiff("y", out, ADate)
198
199 if interval=0 then
200 If thetime="Day" THEN
201 available="no"
202 Exit Do
203 End If
204 If ttime="Day" THEN
205 available="no"
206 Exit Do
207 End If
208 If thetime=ttime THEN
209 REM response.write("x= " & x & "resp= " & resp & thetime & " " & ttime)
210 available="no"
211 Exit Do
212 End If
213
214 Else
215 available="yes"
216
217 end if
218
219 interval=DateDiff("y", out, BDate)
220 if interval=0 then
221 If thetime="Day" THEN
222 available="no"
223 Exit Do
224 End If
225 If ttime="Day" THEN
226 available="no"
227 Exit Do
228 End If
229 If thetime=ttime THEN
230 REM response.write("x= " & x & "resp= " & resp & thetime & " " & ttime)
231 available="no"
232 Exit Do
233 End If
234
235 Else
236 available="yes"
237
238 end if
239
240 end if
241
242 if dbperiod>1 then
243 dim dys(90)
244 for a=0 to dbperiod
245 dys(a) = DateAdd("d", a, out)
246 REM response.write("dates loaded in the days array " & dys(a))%><!--<br>--><%
247 REM response.write("ttime in db " & ttime)%><!--<br>--><%
248 Next
249
250 for b=0 to dbperiod
251
252 test=DateDiff("y", dys(b), ADate)
253 If test=0 then
254 If thetime="Day" THEN
255 available="no"
256 Exit Do
257 End If
258 If ttime="Day" THEN
259 available="no"
260 Exit Do
261 End If
262 If thetime=ttime THEN
263 REM response.write("x= " & x & "resp= " & resp & thetime & " " & ttime)
264 available="no"
265 Exit Do
266 End If
267
268 Else
269 available="yes"
270
271 end if
272
273 Next
274
275 end if
Feb 26 '08 #3
I guess I'm also wondering why it works on one server and not on the other.
Feb 26 '08 #4
CroCrew
564 Expert 512MB
Are you sure that the line “dim dys(90)” is throwing the error?

There is nothing wrong with that dim syntax. I just modified the code that I posted and it worked for me. We are both using the same syntax and I don’t get the error.

Weird!!

Can you re-run that page in your browser and verify that that is the line 243. Try response writing something like the word “start” before that line and then “end” after to see if that really is were the error is being thrown.

This looks to be a fun one~

Expand|Select|Wrap|Line Numbers
  1. <%
  2.     dbperiod = 5
  3.     out = "1/1/2008"
  4.  
  5.     If Not (IsNumeric(dbperiod)) Then
  6.         Response.Write("Error: The value for 'dbperiod' is not a numeric value!")
  7.         Response.End()
  8.     End If
  9.  
  10.     If Not (IsDate(out)) Then
  11.         Response.Write("Error: The value for 'out' is not in a date format!")
  12.         Response.End()
  13.     End If
  14.  
  15.     If (dbperiod > 1) Then
  16.         dim dys(90)
  17.         For a=0 to dbperiod
  18.             dys(a) = DateAdd("d", a, out)
  19.         Next
  20.         i=0
  21.         For Each x In dys
  22.             Response.Write("dys(" & i & ") = " & x & "<br>")
  23.             i=(i+1)
  24.         Next
  25.     End If
  26. %>
  27.  
Feb 26 '08 #5

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

Similar topics

10
by: | last post by:
I am accessing the same error-containing ASP page on an ISP server using w2k IE6 but with different effect. On the first computer I get several line of HTML outputed by ASP, shown correctly by...
3
by: Mike Kanski | last post by:
I get this error Microsoft VBScript runtime error '800a01fb' When i call LoadPicture method, or when i pretty much do any operation with PictureBox like setting width and height. It happened...
3
by: jimbly | last post by:
Hello, can someone help! I am getting an error: Microsoft VBScript runtime error '800a000d Type mismatch /bps/srch-detail.asp, line 137 I didn't write this asp - I know very little about...
1
by: PaulieS | last post by:
Hi all. Am migrating a customer from IIS5 on W2K server to IIS6 on W2K3. Zipped all the websites and unzipped them to the identical locations on new server. Used IISMT to migrate metabase. ...
3
by: easter | last post by:
I have inherited an ASP site and am new to ASP. Part of the site allows the client to update event information about their centre. When they try to add a new event, the following error occurs: ...
2
by: anidmarty | last post by:
Hey I'm a Sysadmin and my users are getting this error on my production box. It works fine on the dev box. There is a script that is run that generates this error. Production is clustered...
0
by: =?Utf-8?B?TWF0dCBDYWxob29u?= | last post by:
HI there, I am getting an error on my page which calls up a web service. Microsoft VBScript runtime error '800a13ba' Unknown runtime error: 'SearchQueryXML' /SearchResults.asp, line 142
4
by: Genken | last post by:
Hi can anybody help me i get this error when running this code. Error Type: Microsoft VBScript runtime (0x800A01A8) Object required: '' And then a line number indicating where the error is, i...
0
by: .nLL | last post by:
Erorr is --------------------- Microsoft VBScript runtime error '800a0046' Permission denied /a.asp, line 3 -----------------------
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?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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.