Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Slow ADODB command object initializing
Message
From
21/04/2001 16:30:06
 
 
To
20/04/2001 15:23:07
Christian Cote
Les Logiciels Onoma Inc.
Longueuil, Quebec, Canada
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00498090
Message ID:
00498297
Views:
10
Hi!

Why you use command for that? It supposed to work with stored procedures mainly. You can use Execute method of the connection. Did you tired that way?

One suggestion: I don't know if Iracle have some tools to track all queries and connections to it (like profiler tool for MS SQL Server). However, if Oracle have such tool, use it to look what does Command object at the moment it slows down. You will see if it connects to server that is the reason. If it does not connects to server, this means that the slow down is related to something internal in ADO, so I guess you have to change the version of ADO.

>HI,
>I need to perform distincts counts on tables. For that I initialize an array of tables that I traverse with a FOR loop. My problem occurs when I try initialize the fields commnadtext property of the Command Object. The text goes a bit lijke this
>CMD.COMMANDTEXT =
> "INSERT INTO STAGEDB.TO_STATS_FIELDCOUNTS VALUES ( " + ;
> STR(iTableId) + ", " + ;
> STR(IIf(IsNull(rsMax.Fields(0).Value), 1, (rsMax.Fields(0).Value + 1))) + ;
> ",'" + rs.Fields(i).Name + ;
> "'," + STR(rsFldCounts.Fields(i).Value) + ",'" + strSystemChosen + "')"
>
>that gives something like this :
>"INSERT INTO STAGEDB.TO_STATS_FIELDCOUNTS VALUES ( 110, 10,'SNAPSHOT_DATE', 1,'PMDB')"
>
>After that I simply issue cmd.execute to insert the values into Oracle. My problem is that when the CMD.COMMANDTEXT line is executed, VFP stops for a few seconds (minutes). If it were stopping at the CMD.EXECUTE line, I would simply use a DO WHILE CMD.STATE = ... to know wheter the line is executing or not and if yes issue a DOEVENTS command to send it to background and display to the user wich table is being processed.
>
>Finally, my question is : why does the program stops when I initialize teh CMD property and how can I avoid this. I had the same behaviour in VB/VBA.
>
>Thnak you for your help,
>Christian Cote
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform