Re: CREATE VIEW by ADO SQL statement
From: Val Mazur (group51a_at_hotmail.com)
Date: 02/28/04
- Next message: Val Mazur: "Re: CREATE VIEW by ADO SQL statement"
- Previous message: Val Mazur: "Re: RecordsetPtr & Command's Execute() method"
- In reply to: Evgeny Zoldin: "CREATE VIEW by ADO SQL statement"
- Next in thread: Val Mazur: "Re: CREATE VIEW by ADO SQL statement"
- Reply: Val Mazur: "Re: CREATE VIEW by ADO SQL statement"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 28 Feb 2004 14:04:38 -0500
Hi,
I think problem here with the ORDER BY clause. Do you need it? What you
could do is to make VIEW based on a SQL statement without ORDER BY, but
later, when you open it, specify sorting
--
Val Mazur
Microsoft MVP
"Evgeny Zoldin" <zoldin@hotmail.com> wrote in message
news:%23WC%23dnf$DHA.2480@TK2MSFTNGP12.phx.gbl...
> Hi ALL.
>
>
>
> I tried to create Query object in Access-2000 MDB file by means of ADO
> API:
>
>
>
> conn - opened ADO.Connection object. I called
>
>
>
> conn.Execute("CREATE VIEW v1 AS SELECT f1, f2, f3 FROM t1 ORDER BY f1
> DESC;")
>
>
>
> and obtained error:
>
>
>
> -2147467259: Only simple SELECT queries are allowed in VIEWS.
>
>
>
> But call
>
>
>
> conn.Execute("CREATE VIEW v1 AS SELECT f1, f2, f3 FROM t1;")
>
>
>
> works fine. Actually I already have query with fields f1 and f2 and just
> want to append the 3rd f3. And I must to do it by ADO mechanism only.
>
>
>
> I will be appreciated for any help.
>
>
>
> Evgeny
>
>
- Next message: Val Mazur: "Re: CREATE VIEW by ADO SQL statement"
- Previous message: Val Mazur: "Re: RecordsetPtr & Command's Execute() method"
- In reply to: Evgeny Zoldin: "CREATE VIEW by ADO SQL statement"
- Next in thread: Val Mazur: "Re: CREATE VIEW by ADO SQL statement"
- Reply: Val Mazur: "Re: CREATE VIEW by ADO SQL statement"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|