Ask a Question related to Coldfusion Database Access, Design and Development.
-
getziggy #1
Type mismatch error
This query works fine on a live server using an MSSQL database:
<cfquery name="qIndex" datasource="#appDSN#" username="shampoo"
password="conditioner">
SELECT sch.ID, sch.Date, sch.Time, cat.Category,
sch.sName, sch.Email, sch.Status, sch.HomePhone,
sch.Dayphone, sch.ApplicationNo, sch.Note
FROM sfiec_scheduling sch, sfiec_scheduleCat cat
WHERE sch.Status = cat.CatID
<cfif isDefined("URL.ShowAll")>
<cfif isDefined("URL.past30")>
AND sch.Date < #CurrentDate# AND sch.Date > #CurrentDate#
- 31
</cfif>
<cfelse>
AND sch.Date >= #CurrentDate# - 1</cfif>
ORDER BY sch.Date ASC, sch.Time ASC </cfquery>
But when I try to use it locally on my testing server, I get the following
error:
Error Executing Database Query.
Type mismatch in expression.
The error occurred in
C:\CFusionMX7\wwwroot\SFInstitute\website\pub\sche duling\index.cfm: line 88
Called from
C:\CFusionMX7\wwwroot\SFInstitute\website\pub\sche duling\index.cfm: line 1
Called from
C:\CFusionMX7\wwwroot\SFInstitute\website\pub\sche duling\index.cfm: line 88
Called from
C:\CFusionMX7\wwwroot\SFInstitute\website\pub\sche duling\index.cfm: line 1
86 : </cfif>
87 : <cfelse>
88 : AND sch.Date >= #CurrentDate# - 1</cfif>
89 : ORDER BY sch.Date ASC, sch.Time ASC </cfquery>Text
Table was imported from the MSSQL table, but have also tried to recreate as a
new table. Date and Time fields are Date/Time in Access..datetime in MSSQL.
I also get a similar error when trying to insert a record in Access. I've also
tried running without the sort <cfif> statement, but get a similar error.
Thanks.
getziggy Guest
-
data type mismatch error...
HI guys, getting pretty stressed with this haha! it's probably something simple...right I have this registration form that does multiple checks... -
0x800A000D - Type Mismatch Error
I am not sure what is goint on. Here's my code inWeekStart = "11" inWeekEnd = "14" Compyear = "2003" Dim rsSQL, strSQL, cmSQL dim... -
Type mismatch Session error
You'll need to post a snippet of relevant code. Ray at work "TD" <TurboDuster@noyahoospam.com> wrote in message... -
Confused with the type mismatch error
I tried your simple example and got no type mismatch. I even modified it so that I was comparing a string to a number and got no type mismatch (it... -
Long Raw Type Mismatch error
I'm new to using long raw fields with ASP. I know it would be easier to leave the files on the file system, but the client wants them in the... -
MikerRoo #2
Re: Type mismatch error
Ditto Dan.
Anyway, there are a lot of problems with that posted code.
Here's a possible bandaid:
Change #CurrentDate# - 1 to #CreateODBCDateTime (CurrentDate -1)#
MikerRoo Guest



Reply With Quote

