|
-
Apr 24th, 2001, 04:41 AM
#1
Thread Starter
Lively Member
Hi all,
I have the following SQL statement in my ASP page:
"SELECT Trainer.TrainerName, FeedBack.CourseID, Max(AttendanceList.ClassDate) AS EndDate, Avg(FeedBack.CourseCon1)
AS AvgOfCourseCon1;"
I'm using Access as my backend database and CourseCon1 is actually an Integer field.
I'm able to call out the values of the rest of the fields but when I type this:
<%= rs("AvgOfCourseCon1") %>
It gaves me this error:
Microsoft VBScript runtime error '800a000d'
Type mismatch
/classrate.asp, line 122
What actually went wrong?
Thanks for any help!!
-
Apr 24th, 2001, 06:27 AM
#2
Black Cat
See if something like this helps:
Code:
<%= CString(rs("AvgOfCourseCon1")) %>
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Apr 24th, 2001, 07:30 AM
#3
Thread Starter
Lively Member
Thanks Josh, will try tomorrow when I get back to my office again
-
Apr 24th, 2001, 08:34 AM
#4
Black Cat
Should be <%= CStr(rs("AvgOfCourseCon1")) %>, not "CString". Also, is there a chance your rs is returning a Null value?
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Apr 24th, 2001, 09:50 AM
#5
Thread Starter
Lively Member
Oh I've already try using the CStr() function too but it doesn't works 
I have try the SQL statements in Microsoft Access and it does return me values.
Any solutions to that?
-
Apr 25th, 2001, 02:55 AM
#6
Are you sure this is the error line on your ASP page
<%= rs("AvgOfCourseCon1") %>
Type mismatch
/classrate.asp, line 122
Sometimes "with my experiences" give the error handler the wrong page line.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|