Re: Add SQL Server views to Cursor Adapter

From: Anders Altberg (
Date: 11/24/04

  • Next message: Ana María Bisbé York: "Re: Add SQL Server views to Cursor Adapter"
    Date: Wed, 24 Nov 2004 21:15:56 +0100

    You can use the views name just like a tablename, In this example it's the
    view "Sales By Category" in the SQL Server demo Northwind database
    LOCAL lUseCursorSchema, lNoData, nOptions
    STORE .F. to lUseCursorSchema, lNoData
    nOptions = -1
    LOCAL llOk As Boolean, oDB As ADODB.Connection
    PUBLIC oCA as CursorAdapter,oRs As ADODB.Recordset
    oDB = Createobject("ADODB.Connection")

    oDB.ConnectionString = ;
    [Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist ;
    Security Info=False;Initial Catalog=Northwind;Data Source=(local)]

    oRs=oDB.Execute('select * from "Sales by Category"')
     oca.Alias='Sales by Category'
    llOk= oCA.CursorFill( lUseCursorSchema, lNoData, nOptions, oRS)

    If llOk
     Browse Last &&Nowait
     MESSAGEBOX('No go with '+oRs.DataSource)


    "Ana María Bisbé York" <> wrote in message
    > Hi all,
    > My name is Ana Ma. Bisbé. I'm writing you from Madrid, Spain.
    > I'm trying to add some views from a SQL Server Data Base into CA. I'm
    > the CA Builder.
    > In the second tab, Data access I've chosen Build for Select Command, and
    > then I saw that there aren't included views, just tables.
    > How should I do? Is any choice, except typing of course?
    > Best regards,
    > Ana

  • Next message: Ana María Bisbé York: "Re: Add SQL Server views to Cursor Adapter"

    Relevant Pages

    • Active Sync and SQL CE
      ... I am trying to develop an application that has sales ... I have a central SQL server that has ... server that hosts SQL directly. ... replication and RDA needs IIS. ...
    • RDA SubmitSQL and connection pooling
      ... I'm involved with a van sales SQL Server ce application thats virtually ... Most of the vans sync within a 2 hour period and the application has had ... profiler reveals that SubmitSQL opens a new connection for every statement ...
    • MSDE as prototype
      ... I have reporting responsibilities in a big company within a marketing ... department and use DB2 queries and Access then excel to create sales and ... profit reports for 3 different sales divisions. ... We have a "SQL server group" ...
    • Re: containstable across columns
      ... SELECT LastName, FirstName, Title, Notes from Employees ... all 9 rows that contain Fuller OR Sales ... SQL Server 7.0 KB article "294809 FIX: ...