A collective thank you all for your replies.
Grigore and Mike, I take it you would no use ADO, at least in a LAN.
And Tracy, thank you for your code example.
Rafael
El 08/06/2010 10:11 a.m., Tracy Pearson escribió:
> Allen wrote on 2010-06-08:
>
>> I thought ADO had its own scan or go next or something like that. Al
>>
>> -----Original Message-----
>> From: Grigore Dolghin
>> Sent: 08 June 2010 14:39
>>
>> I would _strongly_ suggest to use ODBC, not ADO. One of the reasons is
>> ADO returns recordsets, which you cannot SCAN...ENDSCAN, for example.
>>
>>
>>
> Allen,
>
> It does, however, depending on what OleDB you are using, the indexing
> available may not increase the speed of searches. It is possible to bring
> the ADO RecordSet to a Cursor using the CursorAdapter.
>
> Rafael,
>
> Each extra piece you work with is a little extra time. I use the code below
> for read only purposes. There are plenty of ways to create views using an
> ODBC connection, and the CursorAdapter can be useful for writing data back
> through ADO. I have not personally worked with writing data to other data
> sources in a long time.
>
>
> Tracy Pearson
> PowerChurch Software
>
> loRSt = CREATEOBJECT("ADODB.RecordSet")
> loRSt.ActiveConnection =<< Your connection string goes here>>
>
> loCAx = CREATEOBJECT('myCA')
> loCAx.Alias = STRTRAN(cName, " ", "_")
> loCAx.Tables = loTab.Name
> loCAx.DataSource = loRSt
> loCAx.DataSourceType="ADO"
> loCAx.SelectCmd = 'Select * from "' + cName + '"'
> loCAx.CursorFill(.F.)
> *-- Leave cursor open
> loCAx.CursorDetach()
> RELEASE loCAx
> IF loRSt.State<> 0
> loRSt.Close()
> ENDIF
>
> DEFINE CLASS myCA as CursorAdapter
> FetchSize=-1
> FetchMemo=.T.
> CompareMemo=.F.
> UseMemoSize=255
> FetchAsNeeded=.F.
> Prepared = .F.
> ENDDEFINE
>
>
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.