Page 1 of 1
Lost connection using tmstable
Posted: Tue 04 Jan 2005 18:22
by rogerbundy
I have a TMSTable that I modify the SQL command before opening (Active := True) to get a subset of records (3500 records) I need to update or delete. When I try to update all the records one at a time (using the table.edit/post and/or table.delete), after about 400 records being updated or deleted, I lose the connection to SQL Server (Message [DBNETLIB][ConnectionOpen(Connect())] SQL Server does not exist or access denied). I see in DBMonitor that it is issuing the DELETE and/or UPDATE statement, but it seems to fail when it gets over 400 to 500 updates... (I am reading 3500 records with one SQL statement modifying the table.SQL command, then editing and/or deleting them based upon individual content).
Any help would be appreciated.
Re: Lost connection using tmstable
Posted: Wed 05 Jan 2005 07:27
by Ikar
May be you use FetchAll = False?
Posted: Wed 05 Jan 2005 15:43
by rogerbundy
I did have fetchall=false on the two tables involved. I switched them to fetchall=true, and it still fails after about 500 deletes.
Other thoughts?
More.. I pulled the code into a separate project and manually ran it. It worked.
I checked the Profiler for SQL and in my new project, I saw the DELETE/INSERT statements, but in my original program, I saw that before each DELETE/INSERT, a SET NO_BROWSETABLE ON statement is being executed. This statement was not executing in the new project. I compared the connection and table components between the two, but they are the same...
Thoughts???
Posted: Thu 06 Jan 2005 10:31
by Ikar
Probably there are left some queries with in the FetchAll = False original program.
> SET NO_BROWSETABLE ON
This command is added by OLE DB automatically.