Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #7609
| From | "Willie Moore" <williem@wmconsulting.com> |
|---|---|
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: AdoCommand problem in a large SqlServer table |
| Date | 2014-12-10 15:49 -0600 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <m6af4r$4s9$1@speranza.aioe.org> (permalink) |
| References | <7e3ad1d7-28f1-42f8-a317-4b48b0c2ec52@googlegroups.com> |
Paulo,
I agree with Jamal. First test it in SQL Management studio and if it works
in there, remove your timeout or set a larger timeout. ADO command does not
use any indexes. That is the responsibility of the database schema. You
define the table layouts (including indexes) in the schema and the database
does everything else. The query optimization on the server automatically
selects the correct index. If you don’t have indexes on a table of over a
million records, I would expect very poor performance.
Regards,
Willie
Vulcan VIP
"Paulo Oliveira" wrote in message
news:7e3ad1d7-28f1-42f8-a317-4b48b0c2ec52@googlegroups.com...
Hi all,
FUNCTION RunSQLStmtADO_NOVO(cQuery)
LOCAL lSucesso AS LOGIC
LOCAL oCmd AS AdoCommand
LOCAL oRS AS adorecordset
lSucesso:=TRUE
oCmd := AdoCommand{}
oCmd:ActiveConnection := POGetAppObject():oConexaoADO
oCmd:CommandText := cQuery
//TIME OUT
oCmd:CommandTimeout:=300
oCmd:Execute(@lSucesso,NIL,NIL)
oCmd:=NULL_OBJECT
RETURN lSucesso
I use this function to update a table in SqlServer, the table have more than
a million of records, I always get timeouts, it seems that AdoCommand does
not use the primary key of the table. Any idea?
TIA
Paulo Oliveira
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Find similar | Unroll thread
AdoCommand problem in a large SqlServer table Paulo Oliveira <paulo@clipinfor.com> - 2014-11-19 07:52 -0800 Re: AdoCommand problem in a large SqlServer table "Jamal" <someone@example.com> - 2014-11-19 14:24 -0500 Re: AdoCommand problem in a large SqlServer table "Willie Moore" <williem@wmconsulting.com> - 2014-12-10 15:49 -0600
csiph-web