Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

keep getting error 80040e07

Status
Not open for further replies.

caiquemom

Programmer
May 15, 2001
1
US
I can't seem to figure out what I am doing wrong. I keep getting the error message

"Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.
/leghistres1.asp, line 48"

The query I am using is:

SELECT DISTINCTROW publicact1999.PublicAct, publicact1999.Bill, [99HTRIN].[House Pages], [99seni].[Senate Pages], combo.[Page Numbers], publicact1999.Bill FROM ((publicact1999 LEFT JOIN 99HTRIN ON publicact1999.Bill = [99HTRIN].Bill) LEFT JOIN 99seni ON [99HTRIN].Bill = [99seni].Bill) LEFT JOIN combo ON [99seni].Bill = combo.Bill WHERE ('searchpa'='" & Request.QueryString("[by]") & "') AND (publicact1999.PublicAct='" & Request.QueryString("[search]") & "') OR ('searchbill'='" & Request.QueryString("[by]") & "') AND (publicact1999.Bill='" & Request.QueryString("[search]") & "')"


I think that the problem problem is in the AND (publicact1999.Bill='" & Request.QueryString("[search]") & "').

The actual search page is at:
Anyone have any idea?

Chris
 

If the query you posted is the actual query being sent to SQL Server, the problem is that SQL Server has no way to interpret the value of Request.QueryString("[by]") and Request.QueryString("[search]"). Those value must be resolved on your page before executing the query. Terry

X-) "Life would be easier if I had the source code." -Anonymous
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top