>Trying to create a view with a VBS. Not working (why else would I be here [grin]?). Can anyone say why?
>
>
>
>
> Set oCacheConn = CreateObject("ADODB.Connection")
> cConnString = "Provider=VFPOLEDB.1;Data Source=v:\remote1\db\alldbc1.dbc"
> With oCacheConn
> .CursorLocation = 2 ' adUseServer
> .ConnectionString = cConnString
> .Open
> End With
> cExec = "Create View View01 as Select * from alldbc1!accidentstate Top 1"
> oCacheConn.Execute(cExec)
>
>
>
>
>Error is
>D:\wintemp\viewmake.vbs(13, 2) Microsoft OLE DB Provider for Visual FoxPro: Command contains unrecognized phrase/keyword.
>
>?
>
>Thanks.
Steve,
At first glance order by is missing and palce top 1 after select.
And another update :) It'd be SQL View.
Cetin