The problem
During a very simple insert query, using PDO with an ODBC driver for a DB2 database, the driver returns the following error:
SQLSTATE[HY010]: Function sequence error: 0 [Microsoft][Driver Manager ODBC] [italian message translation] (SQLExecute[0] at extpdo_odbcodbc_stmt.c:254)
The query itself is a prepared statement insert, with strings and dates. [italian message translation] just says «Function sequence error» in italian.
The research
This SO question reports the same problem, but occurred during a SELECT query, which is not my case
This PHP bug report reports the same problem, but I’ve determined that’s not my case either.
The question
Why does a simple insert cause a function sequence error with SQLSTATE[HY010]?
asked Dec 3, 2014 at 10:15
Reading from the PHP bug report, users have reported that the issue is related to the format of the date being inserted, because (in that particular case) it was missing some digits from the months number.
That made me think: maybe the length of some input data was incompatible with the table column. In fact, I was writing 80 characters where only 60 could fit.
The solution
Check your input values: length, format and type. One of these may be incompatible with the column you’re writing into. I’d expect a different message from the driver to be honest (data truncated in my case), because the problem isn’t too hard to solve if you have better information.
As soon as I reduced the input length below the maximum value allowed, the query executed successfully
answered Dec 3, 2014 at 10:15
STT LCUSTT LCU
4,3484 gold badges29 silver badges47 bronze badges
|
|||
Irina3gger
04.07.17 — 10:41 |
Доброго времени. Возникла такая проблема, В справочнике создала новый реквизит, но при сохранение выдает ошибку:
SQL State:HY010 Файлы sqlsrv32.dll sqlsrv32.rll odbcbcp.dll были заменены еще при установке SQL Server Подскажите в чем еще может быть проблема? |
||
Ёпрст
1 — 04.07.17 — 10:42 |
(0) только в этом |
||
Ёпрст
2 — 04.07.17 — 10:44 |
Если что, новый реквизит добавьте ручоками. |
||
Irina3gger
3 — 04.07.17 — 10:49 |
(2) Можете пожалуйста повторить еще раз что сделать? А то я не очень поняла |
||
Ёпрст
4 — 04.07.17 — 10:52 |
(3) https://msdn.microsoft.com/ru-ru/library/ms190273(SQL.90).aspx |
||
Ёпрст
5 — 04.07.17 — 10:53 |
Альтернативный вариант
1.Поставить скуль, НЕ меняя никакие библиотеки в нём. |
||
Builder
6 — 04.07.17 — 10:56 |
(5) Это самый правильный вариант. |
||
Irina3gger
7 — 04.07.17 — 10:57 |
Спасибо большое буду пробовать. |
||
Slypower 8 — 05.07.17 — 09:51 |
Или поставить ХР, на ней данная ошибка не будет проявляться. |
Перейти к контенту
|
|||
Irina3gger
04.07.17 — 10:41 |
Доброго времени. Возникла такая проблема, В справочнике создала новый реквизит, но при сохранение выдает ошибку: SQL State:HY010 Native:0 Message:[Microsoft][ODBC SQL Server Driver] Ошибка последовательности функций Файлы sqlsrv32.dll sqlsrv32.rll odbcbcp.dll были заменены еще при установке SQL Server Подскажите в чем еще может быть проблема? |
||
Ёпрст
1 — 04.07.17 — 10:42 |
(0) только в этом |
||
Ёпрст
2 — 04.07.17 — 10:44 |
Если что, новый реквизит добавьте ручоками. В табличку скуля через альтер, и потом просто подмените мд и ддс. Усё |
||
Irina3gger
3 — 04.07.17 — 10:49 |
(2) Можете пожалуйста повторить еще раз что сделать? А то я не очень поняла |
||
Ёпрст
4 — 04.07.17 — 10:52 |
(3) 1. на пустой базе получить новый мд и ддс с добавленным реквизитом, 2.в рабочей базе через alter table добавить этот реквизит в соответствующую табличку справочника. 3. Далее, подменить мд и ддс в рабочей на те, что получены в п.1. 4. Наслаждаться, кушать печенки https://msdn.microsoft.com/ru-ru/library/ms190273(SQL.90).aspx |
||
Ёпрст
5 — 04.07.17 — 10:53 |
Альтернативный вариант 1.Поставить скуль, НЕ меняя никакие библиотеки в нём. 2.Поставить секретный релиз платформы 1с 3.Наслаждаться, кушать печенки |
||
Builder
6 — 04.07.17 — 10:56 |
(5) Это самый правильный вариант. Секретный 7.7 + SQL 2008 работает стабильно. |
||
Irina3gger
7 — 04.07.17 — 10:57 |
Спасибо большое буду пробовать. |
||
Slypower 8 — 05.07.17 — 09:51 |
Или поставить ХР, на ней данная ошибка не будет проявляться. |
ВНИМАНИЕ! Если вы потеряли окно ввода сообщения, нажмите Ctrl-F5 или Ctrl-R или кнопку «Обновить» в браузере.
Тема не обновлялась длительное время, и была помечена как архивная. Добавление сообщений невозможно.
Но вы можете создать новую ветку и вам обязательно ответят!
Каждый час на Волшебном форуме бывает более 2000 человек.
When calling SQLFetch() in our application, the error status «HY010: function sequence error» is returned when using SQL Server 2008 R2. The ODBC trace log contains these entries:
otsvcctl 1954-13bc ENTER SQLGetData
HSTMT 037BE728
UWORD 3
SWORD -8 <SQL_C_WCHAR>
PTR 0x02D24E1C
SQLLEN 256
SQLLEN * 0x0012BF6C
otsvcctl 1954-13bc EXIT SQLGetData with return code 0 (SQL_SUCCESS)
HSTMT 037BE728
UWORD 3
SWORD -8 <SQL_C_WCHAR>
PTR 0x02D24E1C [ 14] «winword»
SQLLEN 256
SQLLEN * 0x0012BF6C (14)
otsvcctl 1954-13bc ENTER SQLFetch
HSTMT 037BE728
otsvcctl 1954-13bc EXIT SQLFetch with return code -1 (SQL_ERROR)
HSTMT 037BE728
DIAG [HY010] [Microsoft][SQL Server Native Client 10.0]Function sequence error (0)
If I understand
http://msdn.microsoft.com/en-us/library/ms710996(v=VS.85).aspx and
http://msdn.microsoft.com/en-us/library/ms712424(v=VS.85).aspx correctly, SQLFetch() never should return HY010 if a previous SQLGetData() succeeded on the same statement handle (because SQLGetData() causes the statement handle to remain in state S6
and SQLFetch() never can return HY010 in state S6).
Is this right, or is there any condition that could cause HY010 in this case? Are there any debugging options that I could use to determine the reason of the HY010 error?
Regards
— Frank
The problem
During a very simple insert query, using PDO with an ODBC driver for a DB2 database, the driver returns the following error:
SQLSTATE[HY010]: Function sequence error: 0 [Microsoft][Driver Manager ODBC] [italian message translation] (SQLExecute[0] at extpdo_odbcodbc_stmt.c:254)
The query itself is a prepared statement insert, with strings and dates. [italian message translation] just says «Function sequence error» in italian.
The research
This SO question reports the same problem, but occurred during a SELECT query, which is not my case
This PHP bug report reports the same problem, but I’ve determined that’s not my case either.
The question
Why does a simple insert cause a function sequence error with SQLSTATE[HY010]?
asked Dec 3, 2014 at 10:15
Reading from the PHP bug report, users have reported that the issue is related to the format of the date being inserted, because (in that particular case) it was missing some digits from the months number.
That made me think: maybe the length of some input data was incompatible with the table column. In fact, I was writing 80 characters where only 60 could fit.
The solution
Check your input values: length, format and type. One of these may be incompatible with the column you’re writing into. I’d expect a different message from the driver to be honest (data truncated in my case), because the problem isn’t too hard to solve if you have better information.
As soon as I reduced the input length below the maximum value allowed, the query executed successfully
answered Dec 3, 2014 at 10:15
STT LCUSTT LCU
4,3284 gold badges30 silver badges47 bronze badges
Модераторы: m0p3e, edward_K, Модераторы
Прямой SQL, ошибка HY010
Салют!
Пытаюсь освоить прямой SQL. Запускаю запрос, собранный операторами sqlAddStr, однако при этом в ms70drv.log выбрасывается
- Код: Выделить всё
30.06.2010 15:52:54 [USER]:
<текст запроса>
30.06.2010 15:52:54 [USER]:
Ошибка(1,0): Ожидался SQL оператор
30.06.2010 15:52:54 [USER]:
HY010: [Microsoft][─шёяхЄўхЁ фЁрщтхЁют ODBC] ╬°шсър яюёыхфютрЄхы№эюёЄш ЇєэъЎшщ
причём именно так, с разной кодировкой последних строк (для тех, кто не понял: последняя строка расшифровывается как «HY010: [Microsoft][Диспетчер драйверов ODBC] Ошибка последовательности функций»). Сам <текст запроса>, скопированный в Query Analyzer, выполняется. Что бы это значило?
- RAJAH
- Местный житель
- Сообщения: 929
- Зарегистрирован: Пн фев 18, 2008 13:49
- Reputation point: 57
Re: Прямой SQL, ошибка HY010
Masygreen » Пт июл 02, 2010 15:49
Собственно логичнее выкладывать код который приводит к ошибкам, а не ошибки ….
Время ведет!
- Masygreen
- Местный житель
- Сообщения: 1089
- Зарегистрирован: Чт сен 04, 2008 11:27
- Откуда: Москва
- Reputation point: 26
-
- Сайт
- ICQ
Re: Прямой SQL, ошибка HY010
RAJAH » Пт июл 02, 2010 16:56
Мне показалось, что дело не в коде, ведь запрос, собранный им, нормально отрабатывает в Query Analyzer. К тому же он весьма громоздок, и я не хотел бы тратить время уважаемых пользователей на анализ сотен строк кода. Вот если бы мне подсказали о природе этих ошибок, я бы поискал фрагмент, отвечающий за это безобразие, и постарался бы его выложить. Если вы настаиваете на том, что причина вышеприведенной ошибки в коде, а не в запросе, приведу и его.
- RAJAH
- Местный житель
- Сообщения: 929
- Зарегистрирован: Пн фев 18, 2008 13:49
- Reputation point: 57
Re: Прямой SQL, ошибка HY010
RAJAH » Пн июл 05, 2010 12:02
Я так понял, пока не приведу код, никто не ответит? Ладно, сами напросились… Под <текст запроса> скрывается это:
- Код: Выделить всё
declare @hdrpsnrec binary(8)
declare @canvalnrec binary(8)
set @hdrpsnrec=0x8001000000002C71
declare @pbigint bigint
set @pbigint=convert(bigint, 0x80010000000002E5)
set @hdrpsnrec=convert(binary(8),@pbigint)
set @pbigint=convert(bigint,0x8000000000000000)
set @pbigint=convert(bigint, 0x8001000000000599)
set @canvalnrec=convert(binary(8),@pbigint)
declare @stackid int
set @stackid=0
declare @spstack table
(id int IDENTITY(0,1) primary key,
sid int,
param1 int
)
declare @tident int
declare @sptable1 table
(id int IDENTITY(0,1) primary key,
level int,
strindex varchar(255),
strindex2 varchar(255),
pslinesnrec binary(8),
pslinescdet binary(8),
hdrpscdetnrec binary(8),
katmcobozn varchar(50),
katmcname varchar(200),
pslinesced binary(8),
barkod varchar(20),
okp varchar(20),
pslinescpodr binary(8),
pslinesceh binary(8),
izgot binary(8),
izgots int,
edizm varchar(20),
edkoef real,
alt_edizm varchar(20),
vesid real,
rashnaed real,
kol real,
alt_koef real,
rashnaizd real,
sklad varchar(20),
ceh varchar(20),
izgotc varchar(20),
marshrut varchar(100),
dm varchar(20),
dl varchar(20),
shr varchar(20),
tol varchar(20),
razmer varchar(50),
tz varchar(50),
katmcorder int,
idce int,
typemainowner int,
idmainowner int,
KD varchar(20)
)
declare @level as int
set @level=0
insert @sptable1 (level, pslinescdet, katmcname, katmcobozn, barkod, okp,vesid,
edizm,
strindex,katmcorder,
idce,typemainowner,
izgot,izgots,
kol,rashnaed, edkoef)
select @level 'level', hdr_ps.f$cizd pslinescdet, katmc.f$name, katmc.f$obozn, katmc.f$barkod,katmc.f$okdp,katmc.f$massa,
case when hdr_ps.f$ced=0x8000000000000000 then kated.f$abbr else katotped.f$abbr end,
'',2,
0,2,
hdr_ps.f$cpodr,hdr_ps.f$wpodr,
hdr_ps.f$ednorm,1,
case when hdr_ps.f$ced=0x8000000000000000 then 1 else katotped.f$koef end
from t$hdr_ps hdr_ps
inner join t$katmc katmc
on hdr_ps.f$cizd=katmc.f$nrec
inner join t$kated kated
on katmc.f$ced=kated.f$nrec
left join t$katotped katotped
on hdr_ps.f$ced=katotped.f$nrec
where @hdrpsnrec=hdr_ps.f$nrec
while (((select count(*) from @sptable1 sptable1 where @level=sptable1.level)>0) and (@level<100))
begin
set @level=@level+1
insert @sptable1 ( level, strindex, pslinesnrec,
pslinescdet, katmcorder,katmcname, katmcobozn,
idce,
typemainowner,
idmainowner,
pslinescpodr, pslinesceh, izgot,izgots, pslinesced,
barkod,okp,vesid,
rashnaed,
kol)
select @level 'level',sptable1.strindex+str(sptable1.id,4)'|', ps_lines.f$nrec pslinesnrec,
ps_lines.f$cdet pslinescdet,typemc.f$order,katmc.f$name,katmc.f$obozn,
case when sptable1.katmcorder=2 then sptable1.id else sptable1.idce end,
case when (typemc.f$order=2) or (typemc.f$order=3) then typemc.f$order else sptable1.typemainowner end,
case when (typemc.f$order=2) or (typemc.f$order=3) then null else case when (sptable1.idmainowner is null) then sptable1.id else sptable1.idmainowner end end,
ps_lines.f$cpodr,ps_lines.f$canval1,
isnull(hdr_psvar.f$cpodr,hdr_ps.f$cpodr),isnull(hdr_psvar.f$wpodr,hdr_ps.f$cpodr),
ps_lines.f$ced,
katmc.f$barkod,katmc.f$okdp,katmc.f$massa,
ps_lines.f$kol,
sptable1.kol*ps_lines.f$kol
from @sptable1 sptable1
inner join t$hdr_ps hdr_ps
on 4=hdr_ps.f$ctypeizd and sptable1.pslinescdet = hdr_ps.f$cizd and 25=hdr_ps.f$kind and 1=hdr_ps.f$active
left join t$hdr_ps hdr_psvar
on 4=hdr_psvar.f$ctypeizd and sptable1.pslinescdet = hdr_psvar.f$cizd and 25=hdr_psvar.f$kind and @canvalnrec=hdr_psvar.f$canval1
inner join t$ps_lines ps_lines
on isnull(hdr_psvar.f$nrec,hdr_ps.f$nrec)=ps_lines.f$chdr
inner join t$katmc katmc
on ps_lines.f$cdet=katmc.f$nrec
inner join t$typemc typemc
on katmc.f$ctype=typemc.f$nrec
where @level-1=sptable1.level
order by typemc.f$order, katmc.f$obozn, katmc.f$name
end
update @sptable1 set strindex2=strindex+str(id,4)+'|', idmainowner=isnull(idmainowner,id)
update @Sptable1 set hdrpscdetnrec=isnull(hdr_psvar.f$nrec,hdr_ps.f$nrec),izgotc=case when isnull(hdr_psvar.f$wpodr,hdr_ps.f$wpodr)=2 then isnull(pizgot.f$kod,'') else '**' end
from @Sptable1 sptable1
inner join t$hdr_ps hdr_ps
on 4=hdr_ps.f$ctypeizd and sptable1.pslinescdet = hdr_ps.f$cizd and 25=hdr_ps.f$kind and 1=hdr_ps.f$active
left join t$hdr_ps hdr_psvar
on 4=hdr_psvar.f$ctypeizd and sptable1.pslinescdet = hdr_psvar.f$cizd and 25=hdr_psvar.f$kind and @canvalnrec=hdr_psvar.f$canval1
left join t$katpodr pizgot
on isnull(hdr_psvar.f$cpodr,hdr_ps.f$cpodr)=pizgot.f$nrec
update @Sptable1 set sklad=isnull(psklad.f$kod,''),ceh=isnull(pceh.f$kod,''),izgotc=isnull(izgotc,''),marshrut=isnull(izgotc,''),
edizm=isnull(edizm,case when pslinesced=0x8000000000000000 then kated.f$abbr else katotped.f$abbr end),
edkoef=case when pslinesced=0x8000000000000000 then 1 else katotped.f$koef end,
alt_edizm=case when pslinesced=0x8000000000000000
then
case when
(select otped.f$akt
from t$katotped otped
where otped.f$ckated = kated.f$nrec and otped.f$cmcusl = katmc.f$nrec)=1
then
(select otped.f$abbr
from t$katotped otped
where otped.f$pr = 1 and otped.f$akt <> 1 and otped.f$cmcusl = katmc.f$nrec)
end
else
case when katotped.f$pr=1
then edizm
else
(select otped.f$abbr
from t$katotped otped
inner join t$katmc
on otped.f$cmcusl = t$katmc.f$nrec and otped.f$pr=1
where pslinescdet = otped.f$cmcusl and pslinesced <> otped.f$nrec)
end
end,
alt_koef=case when pslinesced=0x8000000000000000
then
case when
(select otped.f$akt
from t$katotped otped
where otped.f$ckated = kated.f$nrec and otped.f$cmcusl = katmc.f$nrec)=1
then
(select otped.f$koef
from t$katotped otped
where otped.f$pr = 1 and otped.f$akt <> 1 and otped.f$cmcusl = katmc.f$nrec)
end
else
case when katotped.f$pr=1
then 1
else
(select otped.f$koef
from t$katotped otped
inner join t$katmc
on otped.f$cmcusl = t$katmc.f$nrec and otped.f$pr=1
where pslinescdet = otped.f$cmcusl and pslinesced <> otped.f$nrec)
end
end,
dm=case when paramvoldlsr.f$valempty#8#=1 then convert(varchar(20),convert(float,paramvoldlsr.f$value#8#)) else '' end,
dl=case when paramvoldlsr.f$valempty#9#=1 then convert(varchar(20),convert(float,paramvoldlsr.f$value#9#)) else '' end,
shr=case when paramvoldlsr.f$valempty#10#=1 then convert(varchar(20),convert(float,paramvoldlsr.f$value#10#)) else '' end,
tol=case when paramvoltol.f$valempty#1#=1 then convert(varchar(20),convert(float,paramvoltol.f$value#1#)) else '' end,
KD=case when paramvolKD.f$valempty#5#=1 then convert(varchar(20),convert(float,paramvolKD.f$value#5#)) else '' end,
tz=isnull(spkau.f$code,'')
from @Sptable1 sptable1
inner join t$katmc katmc
on Sptable1.pslinescdet=katmc.f$nrec
left join t$kated kated
on katmc.f$ced=kated.f$nrec
left join t$katotped katotped
on sptable1.pslinesced=katotped.f$nrec
left join t$katpodr pceh
on sptable1.pslinescpodr=pceh.f$nrec
left join t$katpodr psklad
on sptable1.pslinesceh=psklad.f$nrec
left join t$paramvol paramvoldlsr
on sptable1.pslinesnrec=paramvoldlsr.f$cobject and 11053=paramvoldlsr.f$tobject and 0=paramvoldlsr.f$block
left join t$paramvol paramvoltol
on sptable1.pslinesnrec=paramvoltol.f$cobject and 11053=paramvoltol.f$tobject and 1=paramvoltol.f$block
left join t$paramvol paramvolKD
on sptable1.pslinesnrec=paramvolKD.f$cobject and 11053=paramvolKD.f$tobject and 1=paramvolKD.f$block
left join t$spkau spkau
on (paramvoldlsr.f$valempty#7#=1) and
(convert(binary(8),convert(bigint,0x8000000000000000)+convert(bigint,paramvoldlsr.f$value#7#))=spkau.f$nrec)
while (@level>0)
begin
update @sptable1 set marshrut=sptable2.marshrut+'-'+sptable1.marshrut
from @sptable1 sptable1
inner join (select * from @sptable1 where @level=level and 5>katmcorder ) sptable2
on sptable1.idmainowner=sptable2.idmainowner
where @level-1=sptable1.level and 5>sptable1.katmcorder
set @level=@level-1
end
insert @spstack (sid)
values(@stackid)
declare @strindex1 varchar(255)
declare @katmcorder int
declare @pslinesnrec binary (8)
declare @tmptable1 table
(i int IDENTITY(0,1) primary key,
strindex varchar(255),
id int,
idce int,
repr int
)
declare @tmptable2 table
(strindex varchar(255),
id int,
idce int
)
declare @startid int
declare @strindex2 varchar(255)
declare @idce int
while (Select count(*) from @spstack)>0 begin
Select @stackid=max(id) from @spstack
select @startid=sid from @spstack where (@stackid)=id
select @strindex2=strindex2,@idce=idce from @sptable1 where @startid=id
insert @tmptable1 (strindex,repr)
values ('Узел',1)
insert @tmptable1 (strindex,id,idce,repr)
values (@strindex2,@startid,@idce,1)
insert @tmptable1 (strindex,id,idce,repr)
select strindex2,id,idce,1 from @sptable1 where @startid=idce and 1=katmcorder
order by strindex2
insert @tmptable1 (strindex,repr)
values ('СЕ узла',2)
delete from @tmptable2
insert @tmptable2 (strindex,id,idce)
select strindex2,id,idce from @sptable1 where @Startid<>id and @startid=idce and 2=katmcorder
order by strindex2
insert @spstack (sid)
select id from @tmptable2
order by id desc
insert @tmptable1 (strindex,id,idce,repr)
select strindex,id,idce,2 from @tmptable2
insert @tmptable1 (strindex,repr)
values ('Детали собств. пр-ва',3)
select @tident=@@identity
insert @tmptable1 (strindex,id,idce,repr)
select strindex2,id,idce,3 from @sptable1 where @startid=idce and 3=typemainowner
order by strindex2
if @tident=@@identity delete from @tmptable1 where @tident=i
insert @tmptable1 (strindex,repr)
values ('Стандартные покупные изделия',7)
select @tident=@@identity
insert @tmptable1 (strindex,id,idce,repr)
select strindex2,id,idce,4 from @sptable1 where @startid=idce and 7=katmcorder and 2=typemainowner
order by strindex2
if @tident=@@identity delete from @tmptable1 where @tident=i
insert @tmptable1 (strindex,repr)
values ('Покупные материалы',6)
select @tident=@@identity
insert @tmptable1 (strindex,id,idce,repr)
select strindex2,id,idce,4 from @sptable1 where @startid=idce and 6=katmcorder and 2=typemainowner
order by strindex2
if @tident=@@identity delete from @tmptable1 where @tident=i
insert @tmptable1 (strindex,repr)
values ('Покупные комплектующие',5)
select @tident=@@identity
insert @tmptable1 (strindex,id,idce,repr)
select strindex2,id,idce,4 from @sptable1 where @startid=idce and 5=katmcorder and 2=typemainowner
order by strindex2
if @tident=@@identity delete from @tmptable1 where @tident=i
insert @tmptable1 (strindex,repr)
values ('-Конец узла-',1)
delete from @spstack where (@stackid)=id
end
select tmptable1.strindex,tmptable1.repr,
isnull(sptable1.katmcobozn,'<<'+tmptable1.strindex+'>>') 'katmcobozn',
case when sptable1.katmcobozn<>'' then REPLACE(replace(sptable1.katmcname, sptable1.katmcobozn,''), ' ', ' ') else sptable1.katmcname end 'katmcname',
sptable1.barkod,sptable1.okp,sptable1.edizm, sptable1.razmer, sptable1.KD, sptable1.alt_edizm 'alted',
case when sptable1.alt_edizm<>'' then sptable1.edkoef/sptable1.alt_koef else 0 end 'altkoef',
sptable1.vesid,sptable1.rashnaed,sptable1.rashnaizd,sptable1.kol,sptable1.sklad,sptable1.ceh,sptable1.izgotc,sptable1.marshrut,
sptable1.tz, sptable1.dl,sptable1.shr,sptable1.tol,sptable1.dm,
sptable1.katmcorder,sptable1.idce,sptable1.typemainowner,sptable1.idmainowner from @tmptable1 tmptable1
left join @sptable1 sptable1
on tmptable1.id=sptable1.id
- RAJAH
- Местный житель
- Сообщения: 929
- Зарегистрирован: Пн фев 18, 2008 13:49
- Reputation point: 57
Re: Прямой SQL, ошибка HY010
edward_K » Пн июл 05, 2010 12:12
я бы вам посоветовал пойти мелкими шажками и уже привести запрос строк в 10 а не в 100.
Ошибка не галки а MSSQL. Google полно тем дает.
Попробуйте отследить что на выходе идет в MSSQL — галка ведь транслирует ваш запрос. Наверняка какие то символы были нет поняты.
- edward_K
- Заслуженный деятель интернет-сообщества
- Сообщения: 5172
- Зарегистрирован: Вт мар 29, 2005 17:49
- Откуда: SPB galaxy spb
- Reputation point: 115
Re: Прямой SQL, ошибка HY010
edward_K » Пн июл 05, 2010 12:17
вообще по коду добрая часть тянет на сторед процедуру — ее и генерить то каждый раз не нужно — один раз создали и забыли.
- edward_K
- Заслуженный деятель интернет-сообщества
- Сообщения: 5172
- Зарегистрирован: Вт мар 29, 2005 17:49
- Откуда: SPB galaxy spb
- Reputation point: 115
Re: Прямой SQL, ошибка HY010
RAJAH » Пн июл 05, 2010 12:26
edward_K писал(а):Наверняка какие то символы были нет поняты.
Какие символы вы имеете в виду? NULL? Есть такое. Нельзя, что ли?
edward_K писал(а):Ошибка не галки а MSSQL.
Хм… А в чём конкретно ошибка почему MSSQL не говорит? Запрос прекрасно срабатывает в Query Analyzer.
edward_K писал(а):вообще по коду добрая часть тянет на сторед процедуру — ее и генерить то каждый раз не нужно — один раз создали и забыли.
К стыду своему, про Stored Procedure только слышал, сам не сталкивался. Придётся изучить на досуге…
- RAJAH
- Местный житель
- Сообщения: 929
- Зарегистрирован: Пн фев 18, 2008 13:49
- Reputation point: 57
Re: Прямой SQL, ошибка HY010
Den » Пн июл 05, 2010 13:07
Ошибка это не мсскуль, видимо
В ms70,как я понимаю , делает сама галактика ,когда пытается проверить отдаваемый запрос на синтаксис правильный,исходя из продекларированных возможностей dsql. Ведь профайлер, Раджа, ничего не кажет ?
- Den
- Местный житель
- Сообщения: 1839
- Зарегистрирован: Вт мар 29, 2005 17:49
- Откуда: Ярославская область ОАО «Часовой завод Чайка» г. Углич
- Reputation point: 60
-
- ICQ
Re: Прямой SQL, ошибка HY010
Vik » Пн июл 05, 2010 13:15
Ошибка последовательности функций обычно говорит о том, что вы не правильно используете функции доступа к прямому SQL.
- Vik
- Местный житель
- Сообщения: 370
- Зарегистрирован: Чт сен 28, 2006 15:43
- Откуда: Санкт-Петербург
- Reputation point: 26
-
- Сайт
- ICQ
Re: Прямой SQL, ошибка HY010
RAJAH » Пн июл 05, 2010 13:18
Чувствую себя немного ущербным: то хранимые процедуры, то профайлер… Вы слишком умны для меня. Что такое профайлер?
Den, а вы не тот den, у кого здесь http://forum.galaktika.ru/viewtopic.php?f=10&t=394&start=0 была та же ошибка? Чем вылечили?
- RAJAH
- Местный житель
- Сообщения: 929
- Зарегистрирован: Пн фев 18, 2008 13:49
- Reputation point: 57
Re: Прямой SQL, ошибка HY010
Den » Пн июл 05, 2010 13:43
Угу…это я
Тогад разработчики предложили использовать COALESCE. Вроде с ним должно работать. Я уж как то тогда локально проблемы решил пока ждал ответа разработчиков — поэтому попробуйте с ним сами.
Profiler — утилита MSSQL. С ее помощью можно просто посмотреть какой запрос собранный приходит от атлантиса…
- Den
- Местный житель
- Сообщения: 1839
- Зарегистрирован: Вт мар 29, 2005 17:49
- Откуда: Ярославская область ОАО «Часовой завод Чайка» г. Углич
- Reputation point: 60
-
- ICQ
Re: Прямой SQL, ошибка HY010
RAJAH » Пн июл 05, 2010 16:55
Den писал(а):Угу…это я
Тогад разработчики предложили использовать COALESCE. Вроде с ним должно работать.
Использовать COALESCE вместо ISNULL?
P.S. Profiler так сказал:
- Код: Выделить всё
Replay server: BRAIN
Total events = 1
Replayed events = 1
ODBC errors = 0
Internal errors = 1
Total errors = 1
ODBC hit ratio = 100,00 %
Internal hit ratio = 0,00 %
Overall hit ratio = 0,00 %
Replay time = 0 hr 0 min 5 sec 328 ms
Что, интересно, означает «внутренняя ошибка»?
- RAJAH
- Местный житель
- Сообщения: 929
- Зарегистрирован: Пн фев 18, 2008 13:49
- Reputation point: 57
Re: Прямой SQL, ошибка HY010
Vik » Пн июл 05, 2010 17:49
Непонятно немного, вы весь код, что привели выше, пытаетесь выполнить из випа при помощи функционала DSQL? Если да, то как-то это неправильно. edward_K вам правильно сказал — это больше на кандидата в хранимку похоже. Сомневаюсь, что многое из того, что у вас написано будет работать без оформления в виде хранимки. И еще раз, повторюсь, хотя может быть это и не тот случай, но сколько бы раз у меня ни была ошибка последовательности функций, всегда это была моя ошибка — не в том порядке или неправильно использовал функции DSQL.
- Vik
- Местный житель
- Сообщения: 370
- Зарегистрирован: Чт сен 28, 2006 15:43
- Откуда: Санкт-Петербург
- Reputation point: 26
-
- Сайт
- ICQ
Re: Прямой SQL, ошибка HY010
Den » Пн июл 05, 2010 18:24
Что же вы тогда собираете с помощью «..собранный операторами sqlAddStr…» (смотрю первое Ваше сообщение). То что Вы привели — это код на TSQL чистом
Ну да…isnull просто нет в DSQl. Будите огребать ошибку
- Den
- Местный житель
- Сообщения: 1839
- Зарегистрирован: Вт мар 29, 2005 17:49
- Откуда: Ярославская область ОАО «Часовой завод Чайка» г. Углич
- Reputation point: 60
-
- ICQ
Re: Прямой SQL, ошибка HY010
RAJAH » Пн июл 05, 2010 22:48
Vik писал(а):Непонятно немного, вы весь код, что привели выше, пытаетесь выполнить из випа при помощи функционала DSQL?
Я же написал, что этот код из ms70drv.log, «..собранный операторами sqlAddStr…»
- Код: Выделить всё
sqlAddStr(qhandle,'declare @hdrpsnrec binary(8)');
sqlAddStr(qhandle,'declare @canvalnrec binary(8)');
sqlAddStr(qhandle,'set @hdrpsnrec=0x8001000000002C71');
sqlAddStr(qhandle,'declare @pbigint bigint');
sqlAddStr(qhandle,'set @pbigint=convert(bigint, '+nrhdr_QA+')');
...
sqlAddStr(qhandle,'sptable1.vesid,sptable1.rashnaed,sptable1.rashnaizd,sptable1.kol,sptable1.sklad,sptable1.ceh,sptable1.izgotc,sptable1.marshrut,');
sqlAddStr(qhandle,'sptable1.tz, sptable1.dl,sptable1.shr,sptable1.tol,sptable1.dm,');
sqlAddStr(qhandle,'sptable1.katmcorder,sptable1.idce,sptable1.typemainowner,sptable1.idmainowner from @tmptable1 tmptable1');
sqlAddStr(qhandle,'left join @sptable1 sptable1');
sqlAddStr(qhandle,'on tmptable1.id=sptable1.id');
Vik писал(а):Сомневаюсь, что многое из того, что у вас написано будет работать без оформления в виде хранимки.
Опять же: выше уже указано, что в Query Analyzer всё работает.
Den писал(а):isnull просто нет в DSQl
Видимо, в этом всё дело… Интересно, документация, где это всё написано, существует?
Последний раз редактировалось RAJAH Вт июл 06, 2010 11:05, всего редактировалось 1 раз.
- RAJAH
- Местный житель
- Сообщения: 929
- Зарегистрирован: Пн фев 18, 2008 13:49
- Reputation point: 57
Вернуться в Программирование
Кто сейчас на конференции
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 1
The problem
During a very simple insert query, using PDO with an ODBC driver for a DB2 database, the driver returns the following error:
SQLSTATE[HY010]: Function sequence error: 0 [Microsoft][Driver Manager ODBC] [italian message translation] (SQLExecute[0] at extpdo_odbcodbc_stmt.c:254)
The query itself is a prepared statement insert, with strings and dates. [italian message translation] just says «Function sequence error» in italian.
The research
This SO question reports the same problem, but occurred during a SELECT query, which is not my case
This PHP bug report reports the same problem, but I’ve determined that’s not my case either.
The question
Why does a simple insert cause a function sequence error with SQLSTATE[HY010]?
asked Dec 3, 2014 at 10:15
Reading from the PHP bug report, users have reported that the issue is related to the format of the date being inserted, because (in that particular case) it was missing some digits from the months number.
That made me think: maybe the length of some input data was incompatible with the table column. In fact, I was writing 80 characters where only 60 could fit.
The solution
Check your input values: length, format and type. One of these may be incompatible with the column you’re writing into. I’d expect a different message from the driver to be honest (data truncated in my case), because the problem isn’t too hard to solve if you have better information.
As soon as I reduced the input length below the maximum value allowed, the query executed successfully
answered Dec 3, 2014 at 10:15
STT LCUSTT LCU
4,3284 gold badges30 silver badges47 bronze badges
The problem
During a very simple insert query, using PDO with an ODBC driver for a DB2 database, the driver returns the following error:
SQLSTATE[HY010]: Function sequence error: 0 [Microsoft][Driver Manager ODBC] [italian message translation] (SQLExecute[0] at extpdo_odbcodbc_stmt.c:254)
The query itself is a prepared statement insert, with strings and dates. [italian message translation] just says «Function sequence error» in italian.
The research
This SO question reports the same problem, but occurred during a SELECT query, which is not my case
This PHP bug report reports the same problem, but I’ve determined that’s not my case either.
The question
Why does a simple insert cause a function sequence error with SQLSTATE[HY010]?
asked Dec 3, 2014 at 10:15
Reading from the PHP bug report, users have reported that the issue is related to the format of the date being inserted, because (in that particular case) it was missing some digits from the months number.
That made me think: maybe the length of some input data was incompatible with the table column. In fact, I was writing 80 characters where only 60 could fit.
The solution
Check your input values: length, format and type. One of these may be incompatible with the column you’re writing into. I’d expect a different message from the driver to be honest (data truncated in my case), because the problem isn’t too hard to solve if you have better information.
As soon as I reduced the input length below the maximum value allowed, the query executed successfully
answered Dec 3, 2014 at 10:15
STT LCUSTT LCU
4,3284 gold badges30 silver badges47 bronze badges
Имеем Windows 7 стоит 1С 7.7 27 релиза. Есть на нужном месте файлик OrdNoChk.prm. Файлы sqlsrv32.dll и sqlsrv32.rll заменены на аналогичные из 2003 сервера. При изменении текста в модулях конфигурация сохраняется нормально. Но стоит изменить структуру — вылетает ошибка последовательности функции.
На 2003 сервере. Доступ настроен через сетевой диск K: = ServerD$Base
Ошибка вылетает после подключение к базе в момент обработки измененного справочника. Пишет что обработало 900 элементов — а затем ошибка.
текст ошибки полностью в студию
Native: 0 Message: [Microsoft][ODBC SQl Server Driver] Ошибка последовательности функций
не тот код ошибки. Пока читаю дальше
Файлы sqlsrv32.dll и sqlsrv32.rll заменены на аналогичные из 2003 сервера. — я б такими вещами не маялся если честно — а попробовал поставить SQL 2000 Developer
по поводу структуры могу посоветовать посмотреть только общие реквизиты строка неограниченной длины в конец списка
и — та же лажа. ни слова про SQL State: HY010
кстати сюда я полез после того как Гугл мне не помог
ODBC MS SQL какой версии?
далее клиенты набор MDAC посмотреть на 2.7 версию и склоняюсь к ошибке скуля — несовместимости обаботчика — далее про версию скуля не слова как и про сервиспаки … про клиента ОДБСи тож ничего не ясно
ODBC MS SQL 3.86.3959 Немног не понял… Но dll-ки Windows 7 заменил на dll-ки с того сервака на котором скуль. С ХР и 2003 — ошибок нет. Про MDAC — не понял. Можно по-подробнее.
поставить как вариант клиента MS SQL 2000 Developer на 7-ку или попробовать таки комплект драйверов Майкрасофт Дата Аксесс — вытянутый из сборок — версии 2.7 (идет отдельным комплектом) — плюс прописать алиасы на клиенте через clicoyfg
почту глянь … попробуй данные файлы подменить это для скульного 27
завтра сброшу еще правильные sqlsrv32.dll и sqlsrv32.rll
(26,27) Сенкс. Буду ждать. Пока не пришло.
хм странно от меня ушло уже порядком …
а то у меня там какой-то чен
Огромное сенкс за попытку помощи. Нашел лажу сам. Нужно заменять 3 файла sqlsrv32.dll sqlsrv32.rll odbcbcp.dll Тема закрыта
Тэги:
Комментарии доступны только авторизированным пользователям
— ghst-46 I’ve been busy lately collaborating with —E from the Wincache PHP extension and had no time to look into this.
I am also maintainer for the SQL Server Driver for Drupal. A few months ago I tried to revise the driver to make use of the prefetching capabilities of the driver (otherwise we are emulating prefetching in PHP in Drupal which is a massive performance hog).
Please take a look at the discussion regarding moving prefetch away from PHP and usings the PDO’s implementation:
https://www.drupal.org/node/1471506
I have prepared a sample script that demonstrates two of the problems I came accros: null terminated strings and the «Function sequence error».
There is a third problem with nested statements that I am not sure you guys can look into (see comment #8 in the thread).
The thing here is that either of all these issues are solved, or you are out of game in the major CMS’s due to performance. We are a traditional MS shop but customers and government projects impose nowadays to use one of the major Open Source CMS’s for projects, we are seriously trying to stick to MS but the pieces needed to glue PHP + MS SQL + IIS aren’t simply taken care of as frequently as they should. Should there be a bug, it hangs around for years in a low level C extension that is no fun to dive into. (Praise to the Wincache team that have done a great job improving and updating the extension during these last year).
You can download the sample scripts here:
https://www.dropbox.com/s/l3xj5303zd03p00/democode.zip?dl=0
If needed you can get in touch with me through my Drupal.org profile contact form:
https://www.drupal.org/u/david_garcia
Greetings and thanks, hope to see the PHP driver moving forward (and getting compiled for PHP 5.6 soon).
When calling SQLFetch() in our application, the error status «HY010: function sequence error» is returned when using SQL Server 2008 R2. The ODBC trace log contains these entries:
otsvcctl 1954-13bc ENTER SQLGetData
HSTMT 037BE728
UWORD 3
SWORD -8 <SQL_C_WCHAR>
PTR 0x02D24E1C
SQLLEN 256
SQLLEN * 0x0012BF6C
otsvcctl 1954-13bc EXIT SQLGetData with return code 0 (SQL_SUCCESS)
HSTMT 037BE728
UWORD 3
SWORD -8 <SQL_C_WCHAR>
PTR 0x02D24E1C [ 14] «winword»
SQLLEN 256
SQLLEN * 0x0012BF6C (14)
otsvcctl 1954-13bc ENTER SQLFetch
HSTMT 037BE728
otsvcctl 1954-13bc EXIT SQLFetch with return code -1 (SQL_ERROR)
HSTMT 037BE728
DIAG [HY010] [Microsoft][SQL Server Native Client 10.0]Function sequence error (0)
If I understand
http://msdn.microsoft.com/en-us/library/ms710996(v=VS.85).aspx and
http://msdn.microsoft.com/en-us/library/ms712424(v=VS.85).aspx correctly, SQLFetch() never should return HY010 if a previous SQLGetData() succeeded on the same statement handle (because SQLGetData() causes the statement handle to remain in state S6
and SQLFetch() never can return HY010 in state S6).
Is this right, or is there any condition that could cause HY010 in this case? Are there any debugging options that I could use to determine the reason of the HY010 error?
Regards
— Frank
Содержание
- Function sequence error sql
- Answered by:
- Question
- Function sequence error sql
- Answered by:
- Question
- Answers
- All replies
- Error message when an application uses ODBC to bind a TVP and a subtype as DAE in SQL Server 2008: «HY010, [Microsoft][SQL Server Native Client 10.0]Function sequence error»
- Symptoms
- Resolution
- Status
- More Information
- References
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Answered by:
Question
When calling SQLFetch() in our application, the error status «HY010: function sequence error» is returned when using SQL Server 2008 R2. The ODBC trace log contains these entries:
otsvcctl 1954-13bc ENTER SQLGetData
HSTMT 037BE728
UWORD 3
SWORD -8
PTR 0x02D24E1C
SQLLEN 256
SQLLEN * 0x0012BF6C
otsvcctl 1954-13bc EXIT SQLGetData with return code 0 (SQL_SUCCESS)
HSTMT 037BE728
UWORD 3
SWORD -8
PTR 0x02D24E1C [ 14] «winword»
SQLLEN 256
SQLLEN * 0x0012BF6C (14)
otsvcctl 1954-13bc ENTER SQLFetch
HSTMT 037BE728
otsvcctl 1954-13bc EXIT SQLFetch with return code -1 (SQL_ERROR)
HSTMT 037BE728
DIAG [HY010] [Microsoft][SQL Server Native Client 10.0]Function sequence error (0)
If I understand http://msdn.microsoft.com/en-us/library/ms710996(v=VS.85).aspx and http://msdn.microsoft.com/en-us/library/ms712424(v=VS.85).aspx correctly, SQLFetch() never should return HY010 if a previous SQLGetData() succeeded on the same statement handle (because SQLGetData() causes the statement handle to remain in state S6 and SQLFetch() never can return HY010 in state S6).
Is this right, or is there any condition that could cause HY010 in this case? Are there any debugging options that I could use to determine the reason of the HY010 error?
Источник
Function sequence error sql
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Answered by:
Question
I am migrating a application from Linux to windows 8.
And the database of this application is migrated from Oracle 11g database to MS SQL server 2014 using SSMA.
Schema and data are migrated successfully.
Now when I run below command from application. I get this error as shown below:
enable index Originator;
Error: #1900068: enable index failed
System Error: #1400000: State HY010: [Microsoft][SQL Server Native Client 11.0]Function sequence error
Earlier I was getting below error while executing this command.
So I added that filegroup to the database in SQL.
I also added all required data(.mdf) and index files(.ndf) and did the schema and data migration.
After doing this I executed this command again and started getting above error.
Please suggest me how can I resolve this 🙁 ?
enable index Originator;
Error: #1900068: enable index failed
System Error: #1500811: Error executing SQL: create table ix5687465873(
id int not null,
System Error: #1: State 42000: [Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid filegroup specified.
Answers
Here is the snippet which shows why odbc data source is used:
For ENOVIA Studio Modeling Platform Rich Clients .
If this is a 3rd party application you should seek their support for proper configuration. And you should _almost never_ be converting the database on your own. The ISV typically has a supported SQL Server schema and supported data migration procedures for a cross-platform database migration.
- Proposed as answer by Qiuyun Yu Microsoft contingent staff Friday, September 19, 2014 11:53 AM
- Marked as answer by Lydia Zhang Microsoft contingent staff Monday, October 6, 2014 7:23 AM
Satish Kartan http://www.sqlfood.com/
Yes, this filegroup was not existing earlier, thats why I got this error.
Now when I have created this filegroup, I am getting a new error as shown below.
enable index Originator;
Error: #1900068: enable index failed
System Error: #1400000: State HY010: [Microsoft][SQL Server Native Client 11.0]Function sequence error
Satish Kartan http://www.sqlfood.com/
>Can you post the exact DDL that you are running to create this table?
And the exact command the application is sending. «enable index Originator;» is not a valid TSQL command, and I don’t think it’s valid in Oracle either.
- Proposed as answer by Qiuyun Yu Microsoft contingent staff Tuesday, September 16, 2014 12:14 PM
SQL commands sent to to MSSQL on executing that command are :
drop table ix5687465873;
create table ix5687465873(
id int not null,
select * from table1 where Oid=?
?=1
—>select
select Oid1,Value1 from table2 where type=?
?=12345
—>select
—>select
insert into ix5687465873 values (. )
?=-1234567890
?=Abcd_test
—>insert
rollback
Table is created but only 1024 lines are inserted in it and after that it does a rollback.
However, it is not suppose to do a rollback but insert more lines. And drop and create other tables.
What kind of app is it? Can you share the source code that is causing the error?
Is the app creating tables at runtime?
Satish Kartan http://www.sqlfood.com/
The application is inserting each row at a time it seems and then doing a rollback after inserting 1024 rows.
I tried inserting all rows at once in this table manually in a single insert statement (approx. 64000 rows) in MS SQL then it is inserted successfully.
However, when I do it from application using command enable index then every time it is inserting 1024 rows
and then it does a rollback.
For eg. like this
insert into ix5687465873 values (. )
?=1898139624
?=
—>insert
?=1801268155
?=
—>insert
?=-573488584
?=
Satish Kartan http://www.sqlfood.com/
Profiler will also give you the raw error message returned in the «User Error Message» event.
I started the profiler and then executed the enable index command.
But I didn’t see any error message in profiler.
Also, I tried inserting the entire data manually by executing below query directly in ms sql then all 63k rows are inserted, so it doesn’t look like there is any problem in data.
insert into ix5687465873 (id, v1)
select Oid1,Value1 from table2 where type =12345
Also, I tried odbc tracing which shows below error.
Still I am unable to get what could be the cause of this error.
mql 1224-e28 EXIT SQLFetch with return code -1 (SQL_ERROR)
HSTMT 0x00000000048D78C0
DIAG [HY010] [Microsoft][SQL Server Native Client 11.0]Function sequence error (0)
If you see no error then your application is causing the rollback. Profiler trace has transaction events that should show that too.
>DIAG [HY010] [Microsoft][SQL Server Native Client 11.0]Function sequence error (0)
I thought this was a Java app. In that case it shouldn’t be using SQL Native Client. It should be using the Microsoft JDBC Driver for SQL Server
Is the app using the unsupported JDBC-ODBC bridge:
Oracle does not support the JDBC-ODBC Bridge. Oracle recommends that you use JDBC drivers provided by the vendor of your database instead of the JDBC-ODBC Bridge
It looks like you application is rolling back the transaction and then attempting to fetch from an open cursor. This doesn’t work.
The questions are:
1) Why are you using ODBC in a Java app instead of the supported Microsoft JDBC Driver?
2) Why is your application causing a rollback.
1) Why are you using ODBC in a Java app instead of the supported Microsoft JDBC Driver?
It is recommended by vendor. See page 9 on attached pdf in below link.
2) Why is your application causing a rollback.
Thats what we are trying to figure out.
Between I tried connecting application to a vanilla database and executing this command then it is happening successfully. In that database there is no data.
When I try to connect to my database then only 1024 rows are getting inserted and then rollback happening.
So trying to find the cause for rollback.
Here is the snippet which shows why odbc data source is used:
For ENOVIA Studio Modeling Platform Rich Clients such as MQL, Matrix, System, and Business,
the supported operating system architectures have changed. ENOVIA V6R2010x and previous
releases were 32-bit only, while ENOVIA V6R2011 has both 32-bit and 64-bit versions. This
means that for 32-bit applications running on 64-bit operating system versions, the required
ODBC Data Source names have to be created using the 32-bit version of the ODBC Data Source
Administrator found at %WINDIR%SysWOW64odbcad32.exe. For any other combinations (32-
bit apps on 32-bit operating systems and 64-bit apps on 64-bit operating systems), the required
ODBC Data Source names must be created using the Control Panel’s ODBC Data Source
Administrator.
Here is the snippet which shows why odbc data source is used:
For ENOVIA Studio Modeling Platform Rich Clients .
If this is a 3rd party application you should seek their support for proper configuration. And you should _almost never_ be converting the database on your own. The ISV typically has a supported SQL Server schema and supported data migration procedures for a cross-platform database migration.
Источник
Error message when an application uses ODBC to bind a TVP and a subtype as DAE in SQL Server 2008: «HY010, [Microsoft][SQL Server Native Client 10.0]Function sequence error»
Bug #: 50003627 (SQL Hotfix)
Microsoft distributes Microsoft SQL Server 2008 fixes as one downloadable file. Because the fixes are cumulative, each new release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 fix release.
Symptoms
When an application tries to insert data into a table-valued parameter (TVP) subtype in Microsoft SQL Server 2008, the call to the SQLPutData function returns the following SQL_ERROR error message:
HY010, [Microsoft][SQL Server Native Client 10.0]Function sequence error
This problem occurs if the following conditions are true:
The application uses the SQL Server 2008 ODBC driver to bind the TVP as data-at-execution (DAE).
One of the TVP’s subtypes is also bound as DAE.
Resolution
The fix for this issue was first released in Cumulative Update 2. For more information about how to obtain this cumulative update package for SQL Server 2008, click the following article number to view the article in the Microsoft Knowledge Base:
958186 Cumulative update package 2 for SQL Server 2008Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
956909 The SQL Server 2008 builds that were released after SQL Server 2008 was released
Status
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the «Applies to» section.
More Information
For more information about what files are changed, and for information about any prerequisites to apply the cumulative update package that contains the hotfix that is described in this Microsoft Knowledge Base article, click the following article number to view the article in the Microsoft Knowledge Base:
958186 Cumulative update package 2 for SQL Server 2008
References
For more information about the list of builds that are available after the release of SQL Server 2008, click the following article number to view the article in the Microsoft Knowledge Base:
956909 The SQL Server 2008 builds that were released after SQL Server 2008 was released
For more information about the Incremental Servicing Model for SQL Server, click the following article number to view the article in the Microsoft Knowledge Base:
935897 An Incremental Servicing Model is available from the SQL Server team to deliver hotfixes for reported problems
For more information about the naming schema for SQL Server updates, click the following article number to view the article in the Microsoft Knowledge Base:
822499New naming schema for Microsoft SQL Server software update packagesFor more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates
Источник