Actuellement lorsque nous lancons un script sql ( contenant notamment un
fetch) à partir de VB6 on se rend compte que le traitement ne se fait pas
complètement ( cf script ci dessous ). Aucune erreur ne survient, juste le
nombre de lignes maj qui n'est pas conforme.
En executant le script ci dessous, sous l'analyseur de requetes , on a 450
lignes maj, sous Visual Basic 80 uniquement.
Avez vous s'il vous plait, une solution à ce problème ?
merci
Cordialement,
Ex de script :
If Not Exists(Select 1 From format_norme_b2 where VERSION_NORME='062005')
begin
declare @MaxSuivant numeric(12)
declare @IdeChampB2 numeric(12)
declare BoucleB2 cursor for
select distinct IDE_CHAMP_B2 from format_norme_b2 where VERSION_NORME =
'022004'
for read only
open BoucleB2
fetch next from BoucleB2 into @IdeChampB2
while @@FETCH_STATUS=0
Begin
Select @MaxSuivant = max(valeur) + 1 From max_suivant Where table_name =
'format_norme_b2'
Update max_suivant Set valeur = @MaxSuivant Where table_name =
'format_norme_b2'
insert into format_norme_b2
select
@MaxSuivant,TYPE_NORME,NUM_TYPE,NUM_CHAMP,LIBELLE,TYPE_DONNEE,TAILLE_DONNEE,LIEN_TABLE_TMP,
DEF_VAL,getdate(),'062005' from
format_norme_b2 where IDE_CHAMP_B2=@IdeChampB2
fetch next from BoucleB2 into @IdeChampB2
end
close BoucleB2
deallocate BoucleB2
end
go
Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
era
Visual Basic 6 et problème Fetch a écrit :
Bonjour
Actuellement lorsque nous lancons un script sql ( contenant notamment un fetch) à partir de VB6 on se rend compte que le traitement ne se fait pas complètement ( cf script ci dessous ). Aucune erreur ne survient, juste le nombre de lignes maj qui n'est pas conforme.
En executant le script ci dessous, sous l'analyseur de requetes , on a 450 lignes maj, sous Visual Basic 80 uniquement.
Avez vous s'il vous plait, une solution à ce problème ?
merci
Cordialement,
Ex de script :
If Not Exists(Select 1 From format_norme_b2 where VERSION_NORME='062005') begin declare @MaxSuivant numeric(12) declare @IdeChampB2 numeric(12)
declare BoucleB2 cursor for select distinct IDE_CHAMP_B2 from format_norme_b2 where VERSION_NORME = '022004' for read only
open BoucleB2 fetch next from BoucleB2 into @IdeChampB2 while @@FETCH_STATUS=0 Begin Select @MaxSuivant = max(valeur) + 1 From max_suivant Where table_name = 'format_norme_b2' Update max_suivant Set valeur = @MaxSuivant Where table_name = 'format_norme_b2'
insert into format_norme_b2 select @MaxSuivant,TYPE_NORME,NUM_TYPE,NUM_CHAMP,LIBELLE,TYPE_DONNEE,TAILLE_DONNEE,LIEN_TABLE_TMP, DEF_VAL,getdate(),'062005' from format_norme_b2 where IDE_CHAMP_B2=@IdeChampB2
fetch next from BoucleB2 into @IdeChampB2 end close BoucleB2 deallocate BoucleB2 end go
Bonjour, Il y a un NG pour visual: m.p.f.vb era.
Visual Basic 6 et problème Fetch a écrit :
Bonjour
Actuellement lorsque nous lancons un script sql ( contenant notamment un
fetch) à partir de VB6 on se rend compte que le traitement ne se fait pas
complètement ( cf script ci dessous ). Aucune erreur ne survient, juste le
nombre de lignes maj qui n'est pas conforme.
En executant le script ci dessous, sous l'analyseur de requetes , on a 450
lignes maj, sous Visual Basic 80 uniquement.
Avez vous s'il vous plait, une solution à ce problème ?
merci
Cordialement,
Ex de script :
If Not Exists(Select 1 From format_norme_b2 where VERSION_NORME='062005')
begin
declare @MaxSuivant numeric(12)
declare @IdeChampB2 numeric(12)
declare BoucleB2 cursor for
select distinct IDE_CHAMP_B2 from format_norme_b2 where VERSION_NORME =
'022004'
for read only
open BoucleB2
fetch next from BoucleB2 into @IdeChampB2
while @@FETCH_STATUS=0
Begin
Select @MaxSuivant = max(valeur) + 1 From max_suivant Where table_name =
'format_norme_b2'
Update max_suivant Set valeur = @MaxSuivant Where table_name =
'format_norme_b2'
insert into format_norme_b2
select
@MaxSuivant,TYPE_NORME,NUM_TYPE,NUM_CHAMP,LIBELLE,TYPE_DONNEE,TAILLE_DONNEE,LIEN_TABLE_TMP,
DEF_VAL,getdate(),'062005' from
format_norme_b2 where IDE_CHAMP_B2=@IdeChampB2
fetch next from BoucleB2 into @IdeChampB2
end
close BoucleB2
deallocate BoucleB2
end
go
Actuellement lorsque nous lancons un script sql ( contenant notamment un fetch) à partir de VB6 on se rend compte que le traitement ne se fait pas complètement ( cf script ci dessous ). Aucune erreur ne survient, juste le nombre de lignes maj qui n'est pas conforme.
En executant le script ci dessous, sous l'analyseur de requetes , on a 450 lignes maj, sous Visual Basic 80 uniquement.
Avez vous s'il vous plait, une solution à ce problème ?
merci
Cordialement,
Ex de script :
If Not Exists(Select 1 From format_norme_b2 where VERSION_NORME='062005') begin declare @MaxSuivant numeric(12) declare @IdeChampB2 numeric(12)
declare BoucleB2 cursor for select distinct IDE_CHAMP_B2 from format_norme_b2 where VERSION_NORME = '022004' for read only
open BoucleB2 fetch next from BoucleB2 into @IdeChampB2 while @@FETCH_STATUS=0 Begin Select @MaxSuivant = max(valeur) + 1 From max_suivant Where table_name = 'format_norme_b2' Update max_suivant Set valeur = @MaxSuivant Where table_name = 'format_norme_b2'
insert into format_norme_b2 select @MaxSuivant,TYPE_NORME,NUM_TYPE,NUM_CHAMP,LIBELLE,TYPE_DONNEE,TAILLE_DONNEE,LIEN_TABLE_TMP, DEF_VAL,getdate(),'062005' from format_norme_b2 where IDE_CHAMP_B2=@IdeChampB2
fetch next from BoucleB2 into @IdeChampB2 end close BoucleB2 deallocate BoucleB2 end go