Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ASP / Database Access / February 2008



Tip: Looking for answers? Try searching our database.

Type Mismatch Error-- how?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dekar27 - 07 Feb 2008 07:45 GMT
Hello,

I'm working on a website that uses ASP (Visual Basic) with a MS Access
Database. I came to work for this company after a lot of other people, so
everything was in shambles, and I had to design a new product page for them.
However, I didn't know ANY ASP whatsoever when I started, so I mostly taught
myself from their old code and been helped by my brother and a few friends.
Unfortunately, though, I have been unable to find the answer to this type
mismatch error that I'm receiving.

Basically, in the product page, the header.asp file handles all the database
accessing and stores the right entries in the database in different variables
(rs1, rs2, rs3, and rs4). When I try to access any of them, though, using the
exact same method that they use in their other pages, I get a type mismatch
error.

I really need some help with this-- I don't know who else to ask.

This is a link to the test version of this page:
http://www.aispro.com/test/products/products.asp?cat=dig&type=standalone

Here is a zip to the ASP files used in this page:
http://www.aispro.com/test/products/productTesting.zip
header.asp - Contains the main connections to the database. The problem
would most likely be there.
products.asp - Contains the layout for the product information and the
record set calls-- this is where the error occurs and I can't access any
record set data without it giving me the type mismatch error. Problem could
be here.
footer.asp - Contains the closing of the page. Doubtful that the problem is
here, 'cause the only that happens here is the closing of the database
connections.
mediaview.asp - Contains the ORIGINAL version of the products page where
their database calls are working and where I got the blueprints to use this
method to go about my work. If you think that I did something wrong in my
style, it's because I got it from here. And you'll see how it works here,
too. If you want to see a live version of this page, go to
http://www.aispro.com/products/mediaview.asp

I know the style of this page is kinda bad, but that's only because I don't
really know how to use ASP. Any help is greatly appreciated, as I'm way past
the deadline to finish this website. Thanks in advance, and I look forward to
your replies.
McKirahan - 07 Feb 2008 12:33 GMT
> Hello,
>
[quoted text clipped - 16 lines]
> This is a link to the test version of this page:
> http://www.aispro.com/test/products/products.asp?cat=dig&type=standalone

[snip]

The above page fails with this error:

   Microsoft VBScript compilation  error '800a03ee'
   Expected ')'
   /test/products/products.asp, line 18
   Response.Write(rs4("productpic")
   --------------------------------^
Dekar27 - 07 Feb 2008 18:12 GMT
Whoops, sorry. Try again, please.

> > Hello,
> >
[quoted text clipped - 33 lines]
>     Response.Write(rs4("productpic")
>     --------------------------------^
McKirahan - 07 Feb 2008 18:48 GMT
> Whoops, sorry. Try again, please.

{snip]

Please don't top-post.

Does this file exist?

<link rel="File-List" href="header_files/filelist.xml">
McKirahan - 07 Feb 2008 18:56 GMT
> > Whoops, sorry. Try again, please.
>
> {snip]

<URL:http://www.aispro.com/test/products/products.asp?cat=dig&type=standalon
e>

fails on this statement.

<%=rs4("header")%>
Daniel Crichton - 08 Feb 2008 13:20 GMT
McKirahan wrote  on Thu, 7 Feb 2008 12:56:24 -0600:

>>> Whoops, sorry. Try again, please.

>> {snip]

> <URL:http://www.aispro.com/test/products/products.asp?cat=dig&type=
> standalon

> fails on this statement.

> <%=rs4("header")%>

Is the value of the "header" column on that row null?

Signature

Dan

Dekar27 - 09 Feb 2008 01:22 GMT
No, the header column has "Stand-Alone Digital Signage" in it. Also, in
design view, the field is designated as a text field, so I imagine that
should be correct. There are some null cells in the table, but there aren't
ANY in the header column.

If this helps at all, this database was made using MS Access 2000. I've
heard that there was a version of MS Access databases that didn't allow more
than one connection at a time, which might make sense why I'm getting this
error, maybe? I'll try converting it to a 2003 Database, but I'm pretty sure
that it won't really help.

> McKirahan wrote  on Thu, 7 Feb 2008 12:56:24 -0600:
>
> Is the value of the "header" column on that row null?
Daniel Crichton - 11 Feb 2008 17:33 GMT
Dekar27 wrote  on Fri, 8 Feb 2008 17:22:00 -0800:

> No, the header column has "Stand-Alone Digital Signage" in it. Also, in
> design view, the field is designated as a text field, so I imagine that
> should be correct. There are some null cells in the table, but there
> aren't
> ANY in the header column.

> If this helps at all, this database was made using MS Access 2000. I've
> heard that there was a version of MS Access databases that didn't allow
> more  than one connection at a time, which might make sense why I'm
> getting this  error, maybe? I'll try converting it to a 2003 Database,
> but I'm pretty sure  that it won't really help.

Are you reading the columns in order from left to right as they appear in
the recordset? If not, and you have a text/image column in the results, then
with some cursor settings once you read a text/image column the value of all
other columns to the left of it are discarded - if you then try to read them
you'll get a NULL value instead, and so you could still get that type
mismatch as <%=rs4(...)%> will expect something that can be converted to a
string, not NULL.

Signature

Dan

Dekar27 - 09 Feb 2008 00:11 GMT
I commented out that line of code- I'm not sure exactly what it does, but I
can't seem to find that file anywhere on our server anyway, so I can't
imagine it was that important.  Same error.

Like I said, I was hired to do this after they went through so many others,
so the entire system is a bit of a mess. Thanks for the help, though.

> Please don't top-post.
>
> Does this file exist?
>
> <link rel="File-List" href="header_files/filelist.xml">
Jon Paal [MSMD] - 07 Feb 2008 19:42 GMT
check your rs4 sql query statement

you're probably trying to get a string instead of a number

> Hello,
>
[quoted text clipped - 39 lines]
> the deadline to finish this website. Thanks in advance, and I look forward to
> your replies.
Dekar27 - 09 Feb 2008 00:08 GMT
I am trying to get a string; is this not how I'm supposed to be getting it?

According to mediaview.asp, that's how they access the database and they get
strings from it.

> check your rs4 sql query statement
>
> you're probably trying to get a string instead of a number
Jon Paal [MSMD] - 09 Feb 2008 16:51 GMT
verify that the datatype of the database filed is the same type as the sql statement.

>I am trying to get a string; is this not how I'm supposed to be getting it?
>
[quoted text clipped - 4 lines]
>>
>> you're probably trying to get a string instead of a number
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.