-
Уважаемые мастера!
Я наткнулся на странный феномен. Работаю с базой данных. Использую dbExpress'ный компонент SQLQuery и, соответственно, свойство SQL. Последовательно добавляю в него инсерты один за другим. Мноого инсертов. Хочу отправить SQL на исполнение, а мне говорят - "неверный синтаксис" оО Стал копать. Обнаружилось, что на каком-то шаге цикла в список начинает добавляться какая-то полная несуразица. Провожу эксперимент: for i:=1 to 1000 do DataModule4.SQLInserts.SQL.Append(inttostr(i)); и заглядываю внутрь DataModule4.SQLInserts.SQL.Text, и вижу там, пардон, вот эту херню ...'839'#$D#$A'840'#$D#$A'841'#$D#0#0#0#0#0#0#0#0#0#0#0#0'РdJ'#0'РЏѕ'#5'08!'#7#8 #0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0'ёfJ'#0'XЏѕ'#5'07!'#7#8#0#0#0#0#0#0#0#0#0# 0#0#0#0#0#0#0#0#0#0'XgJ'#0'$”є'#5'Р=!'#7#8#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 'XeJ'#0#4'“є'#5'°M!'#7#8#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0'мiJ'#0'(іЊ'#5'p%!'#7#8#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0'TdJ'#0'ЂGЊ'#5'0,!'#7#8#0#0#0#0#0#0# 0#0#0#0#0#0#0#0#0#0#0#0#0'leJ'#0' ’є'#5'°K!'#7#8#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 #0#0#0'thJ'#0'мFЊ'#5#0#0#0#0#8#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0' gJ'#0' 2;aЊ'#5'°H!'#7#8#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0'ddJ'#0'8aЊ'#5#0#0#0#0#8#0 #0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0'ґeJ'#0'TFЊ'#5#0#0#0#0#8#0#0#0#0#0#0#0#0#0#0 #0#0#0#0#0#0#0#0#0#$14'hJ'#0#4'EЊ'#5'Р-!'#7#8#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0' fJ'#0'ёўѕ'#5#0#0#0#0#8#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0'„dJ'#0'Ф’є'#5'0'!'# 7#8#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0'LcJ'#0'd“є'#5'0R!'#7#8#0#0#0#0#0#0#0#0 #0#0#0#0#0#0#0#0#0#0#0' cJ'#0'Hђѕ'#5#0#0#0#0#8#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 #0#0#4'gJ'#0'HPЊ'#5#0#0#0#0#8#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0'аgJ'#0#$C'–є '#5#0#0#0#0#8#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0'HiJ'#0#0'DЊ'#5#$10'%!'#7#8#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0'?cJ'#0' AЊ'#5'06!'#7#8#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0'АcJ'#0'„DЊ'#5'Р@!'#7#8#0#0# 0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0'PgJ'#0'HIЊ'#5#0#0#0#0#8#0#0#0#0#0#0#0#0#0#0#0# 0#0#0#0#0#0#0#0'<iJ'#0'ШJЊ'#5'РI!'#7#8#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0'?eJ '#0'¬@Њ'#5#$10';!'#7#8#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0'ґhJ'#0'МPЊ'#5'p)!'# 7#8#0#0#0#0
После 841 шага в списке ерунда. Что бы это значило и как с этим бороться?
-
> и заглядываю внутрь DataModule4.SQLInserts.SQL.Text
Как заглядываешь?
-
> Использую dbExpress'ный компонент SQLQuery
sqlcommand предпочтительнее
> Последовательно добавляю в него инсерты один за другим.
там 1 sql должен быть, а не много
|