Re: CREATE VIEW by ADO SQL statement

From: Val Mazur (group51a_at_hotmail.com)
Date: 02/28/04


Date: Sat, 28 Feb 2004 14:07:12 -0500

Hi again,

What is your connection string to the database?

-- 
Val Mazur
Microsoft MVP
"Val Mazur" <group51a@hotmail.com> wrote in message 
news:O1g%2332i$DHA.2804@tk2msftngp13.phx.gbl...
> 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
>>
>>
>
> 


Relevant Pages

  • Re: CREATE VIEW by ADO SQL statement
    ... "Val Mazur" wrote in message ... > "Evgeny Zoldin" wrote in message ... >> I tried to create Query object in Access-2000 MDB file by means of ADO ... And I must to do it by ADO mechanism only. ...
    (microsoft.public.vb.database.ado)
  • Re: CREATE VIEW by ADO SQL statement
    ... could do is to make VIEW based on a SQL statement without ORDER BY, ... "Evgeny Zoldin" wrote in message ... > I tried to create Query object in Access-2000 MDB file by means of ADO ... And I must to do it by ADO mechanism only. ...
    (microsoft.public.data.ado)
  • Re: CREATE VIEW by ADO SQL statement
    ... could do is to make VIEW based on a SQL statement without ORDER BY, ... "Evgeny Zoldin" wrote in message ... > I tried to create Query object in Access-2000 MDB file by means of ADO ... And I must to do it by ADO mechanism only. ...
    (microsoft.public.vb.database.ado)