Ask a Question related to ASP Database, Design and Development.
-
Roy Danon #1
Having Problems With SQL Statement[ACCESS DB]
Hi,
This is my SQL Procedure :
IFF(21 in(SELECT PageID FROM TBL_Trafic WHERE PageID=21), (UPDATE TBL_Trafic
SET Hits=Hits+1, BytesUsed=BytesUsed+1713, LastEntered=now() WHERE
PageID=21), INSERT INTO TBL_Trafic
(WebsiteID,PageID,Hits,BytesUsed,LastEntered) VALUES (1,21,1,1713,now()))
For some reason, I get the following error :
Microsoft JET Database Engine (0x80040E14)
Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT',
or 'UPDATE'.
/Config.asp, line 151
What's the problem here?
Roy.
Roy Danon Guest
-
IF Statement Problems
Hi, I'm trying to set a variable depending on the value of my user variable, but every single time it defaults to the first one. My script is... -
Show Access DB-content with i.e. WHEN-statement??
I have a database with an autoincrement ID-column and a ParentID-column. Its used in a sort of "thread-environment" When a new thread is... -
Access 2k SQL Statement
I am trying to get the SQL statement right for querying an Access 2k database I would like to obtain the first record of Event A and the last... -
Problems with SQL Statement.
Hi. I'm trying to enter information from a HTM form and send it to an ASP page. Here's the code that I'm using as a reference. <---begin... -
access insert statement
have you tried? was there an error? I'm not sure that Access has the "@@identity".... I'd suggest trying and posting the specific errors. --... -
Bob Barrows #2
Re: Having Problems With SQL Statement[ACCESS DB]
Roy Danon wrote:
Several problems here. Have you tested this query in Access? For one thing:> Hi,
> This is my SQL Procedure :
>
> IFF(21 in(SELECT PageID FROM TBL_Trafic WHERE PageID=21), (UPDATE
> TBL_Trafic SET Hits=Hits+1, BytesUsed=BytesUsed+1713,
> LastEntered=now() WHERE PageID=21), INSERT INTO TBL_Trafic
> (WebsiteID,PageID,Hits,BytesUsed,LastEntered) VALUES
> (1,21,1,1713,now()))
>
>
> For some reason, I get the following error :
>
> Microsoft JET Database Engine (0x80040E14)
> Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE',
> 'SELECT', or 'UPDATE'.
> /Config.asp, line 151
>
> What's the problem here?
>
>
there is no such function as IFF.
When you test it in Access, you will see several other problems. Some of the
standouts:
1. you cannot use control-of-flow language in a Jet query.
2. you cannot batch sql statements in a single query
You have to do the control-of-flow stuff in the code that is calling the
queries.
Bob Barrows
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Bob Barrows Guest
-
Roy Danon #3
Re: Having Problems With SQL Statement[ACCESS DB]
Thank You,
I think I will use a recordset to check number of records.
Happy Hanucah,
Roy.
"Bob Barrows" <reb01501@NOyahoo.SPAMcom> wrote in message
news:O8vigZXAEHA.2480@TK2MSFTNGP12.phx.gbl...thing:> Roy Danon wrote:> Several problems here. Have you tested this query in Access? For one> > Hi,
> > This is my SQL Procedure :
> >
> > IFF(21 in(SELECT PageID FROM TBL_Trafic WHERE PageID=21), (UPDATE
> > TBL_Trafic SET Hits=Hits+1, BytesUsed=BytesUsed+1713,
> > LastEntered=now() WHERE PageID=21), INSERT INTO TBL_Trafic
> > (WebsiteID,PageID,Hits,BytesUsed,LastEntered) VALUES
> > (1,21,1,1713,now()))
> >
> >
> > For some reason, I get the following error :
> >
> > Microsoft JET Database Engine (0x80040E14)
> > Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE',
> > 'SELECT', or 'UPDATE'.
> > /Config.asp, line 151
> >
> > What's the problem here?
> >
> >the> there is no such function as IFF.
>
> When you test it in Access, you will see several other problems. Some of> standouts:
> 1. you cannot use control-of-flow language in a Jet query.
> 2. you cannot batch sql statements in a single query
>
> You have to do the control-of-flow stuff in the code that is calling the
> queries.
>
> Bob Barrows
> Bob Barrows
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>
>
Roy Danon Guest
-
Unregistered #4
Having Problems With SQL Statement[ACCESS DB]
How do you do this problem?
Name (1st 25 characters only) with the column heading 'Theatre-Name'
The concatenation of City (1st 10 characters only), a comma, a space, and State with the column heading 'Location'Unregistered Guest



Reply With Quote

