Deekman
12-07-2005, 02:06 AM
Hi guys I've got a bit of a problem.
I'm trying to code a website in asp and pass a couple of variables through the url so that whn the next page loads it'll only show those specific records.
Problem is though I keep recieving this error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.
/Deekman/stories_full.asp, line 50 --
This is the query string i'm using to try and access the database:
querystring = "SELECT stories.ID, stories.PosterID, stories.StoryNumber, stories.Chapter, stories.Body, story_list.StoryName FROM story_list INNER JOIN stories ON story_list.IdNumber = stories.StoryNumber WHERE StoryNumber ='" & request("IdNumber") & "' AND Chapter =" & request("ChapterNumber")
It seems to all work fine until I try and make it pass multiple variables, that's when it falls to pieces.
The URL looks like this when and it's definatly passing the variable as I have tried getting rid of one from the query statement and it works fine.
/stories_full.asp?IdNumber=1&ChapterNumber=1
I'm completely stumped, I do not have much experience with ASP but from other places I have looked and researched my SQL statement seems correct, can anyone help me out?
I'm trying to code a website in asp and pass a couple of variables through the url so that whn the next page loads it'll only show those specific records.
Problem is though I keep recieving this error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.
/Deekman/stories_full.asp, line 50 --
This is the query string i'm using to try and access the database:
querystring = "SELECT stories.ID, stories.PosterID, stories.StoryNumber, stories.Chapter, stories.Body, story_list.StoryName FROM story_list INNER JOIN stories ON story_list.IdNumber = stories.StoryNumber WHERE StoryNumber ='" & request("IdNumber") & "' AND Chapter =" & request("ChapterNumber")
It seems to all work fine until I try and make it pass multiple variables, that's when it falls to pieces.
The URL looks like this when and it's definatly passing the variable as I have tried getting rid of one from the query statement and it works fine.
/stories_full.asp?IdNumber=1&ChapterNumber=1
I'm completely stumped, I do not have much experience with ASP but from other places I have looked and researched my SQL statement seems correct, can anyone help me out?