Reply to Re: Large number of INSERT statements - not all are executed

Your name:

Reply:


Posted by Marcin A. Guzowski on 02/09/07 17:43

Hi Dmitri,

> I have a developer that is playing around with some SQL statements
> using VB.NET. He has a test table in a SQL 2000 database, and he has
> about 2000 generated INSERT statements.
>
> When the 2000 INSERT statements are run in SQL query analyzer, all
> 2000 rows are added to the table. When he tries to send the 2000
> statements to SQL Server through his app., a random number of
> statements do not get executed. But, SQL Profiler shows that each of
> the 2000 statements are getting sent to the server.

How were the statements sent to SQL Server?
One batch with 2k statements or one statement per batch?
What about transactions (autocommit mode)?
What events were set to be captured by Profiler?

> I suggested that he add a "GO" statement at the end of the INSERT
> block, but the statement fails when that is sent to the server.

Wrong suggestion. "GO" is not an SQL statement and can be used only in
Query Analyzer (Enterprise Manager, Management Studio). It signals the
end of a batch to MSSQL utilities, SQL Server doesn't understand it at all.


--
Best regards,
Marcin Guzowski
http://guzowski.info

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация