Friday, February 24, 2012

Error #403?

Hi everybody,
Can someone tell me how to resolver error #403? It's got something to do
with a operator that is equal to a divide thing.Can you show the code you're using, and the actual error message you
receive?
"Nicollo Machiaveli" <machiaveli280278@.hotmail.com> wrote in message
news:#AMCAvBXDHA.1896@.TK2MSFTNGP12.phx.gbl...
> Hi everybody,
> Can someone tell me how to resolver error #403? It's got something to do
> with a operator that is equal to a divide thing.
>|||>--Original Message--
>Can you show the code you're using, and the actual error
message you
>receive?
>
>"Nicollo Machiaveli" <machiaveli280278@.hotmail.com> wrote
in message
>news:#AMCAvBXDHA.1896@.TK2MSFTNGP12.phx.gbl...
>> Hi everybody,
>> Can someone tell me how to resolver error #403? It's
got something to do
>> with a operator that is equal to a divide thing.
>
>.
>Hi,
The expression i use is in a query, like this:
field1: 40-(Date()-[field0])/7
And the error is like this:
sql error, the operater equals divide equals dattime or
something. I will paste the actual error tommorow. I'm at
home right now.|||> field1: 40-(Date()-[field0])/7
Uh, you expect date() - field0 to return a number? It won't, it will return
a date. Maybe you could explain exactly what you are trying to do...
instead of using /7, for example, you might consider using DATEDIFF with a
parameter of WEEK.|||>--Original Message--
>> field1: 40-(Date()-[field0])/7
>Uh, you expect date() - field0 to return a number? It
won't, it will return
>a date. Maybe you could explain exactly what you are
trying to do...
>instead of using /7, for example, you might consider
using DATEDIFF with a
>parameter of WEEK.
>
>.
>Aaron,
Here's the actual errorcode:
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid
operator for data type. Operator equals divide, type
equals datetime. (#403)
And here's the query in sqlstatement:
SELECT table1.ID, table1.name, table1.DOB,
table2.Appointment, (40-([Date1]-[appointment])/7) AS
[Codenr], ([Date1]-(22*7)) AS [result], ([Date1]-(16*7))
AS [max]
FROM table1 INNER JOIN table2 ON table1.ID = table2.ID
WHERE (((table2.Appointment)>(Date()+21)) AND (((40-
([Date1]-[Appointment])/7))<18 Or ((40-([Date1]-
[Appointment])/7))>24) AND ((table1.active) Like "part*"
Or (table1.active) Like "doet*"));|||> table2.Appointment, (40-([Date1]-[appointment])/7)
Once again (is there an echo?), you're trying to divide a datetime by 7. As
the error message clearly indicates, you can't divide a datetime by
anything.
If you state your exact requirements, we can help you... in the meantime, I
have no idea what Date1 - appointment is supposed to return.

No comments:

Post a Comment