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.
Lost connection using tmstable
Re: Lost connection using tmstable
May be you use FetchAll = False?
-
- Posts: 3
- Joined: Thu 11 Nov 2004 08:40
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???
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???