Re: CREATE VIEW by ADO SQL statement
From: Val Mazur (group51a_at_hotmail.com)
Date: 02/28/04
- Next message: Val Mazur: "Re: Error 3265"
- Previous message: Val Mazur: "Re: CREATE VIEW by ADO SQL statement"
- In reply to: Val Mazur: "Re: CREATE VIEW by ADO SQL statement"
- Next in thread: Evgeny Zoldin: "Re: CREATE VIEW by ADO SQL statement"
- Reply: Evgeny Zoldin: "Re: CREATE VIEW by ADO SQL statement"
- Messages sorted by: [ date ] [ thread ]
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
>>
>>
>
>
- Next message: Val Mazur: "Re: Error 3265"
- Previous message: Val Mazur: "Re: CREATE VIEW by ADO SQL statement"
- In reply to: Val Mazur: "Re: CREATE VIEW by ADO SQL statement"
- Next in thread: Evgeny Zoldin: "Re: CREATE VIEW by ADO SQL statement"
- Reply: Evgeny Zoldin: "Re: CREATE VIEW by ADO SQL statement"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|