Convertir réel en chaine

Résolu
zekabyle Messages postés 28 Date d'inscription lundi 6 mars 2006 Statut Membre Dernière intervention 2 janvier 2007 - 9 mai 2006 à 11:02
zekabyle Messages postés 28 Date d'inscription lundi 6 mars 2006 Statut Membre Dernière intervention 2 janvier 2007 - 17 mai 2006 à 09:42
j'ai utilisé Cstr mais dans ma requête SQL j'ai une erreur de type 1 paramètre attendu:
TabPTFU(4,i) est un réel que je veux transformer en chaine
Voici un morceau du code:

TabPTFU(4,i)=CStr(TabPTFU(4,i))
SQLIngPTFU "UPDATE activitePTF SET act_nbjourpPTF '& TabPTFU(4,i) &' WHERE act_moi_moisPTF = '"& TabPTFU(0,i) &"' AND act_tac_codact = "& TabPTFU(1,i) &" AND act_ing_codingPTF = "& TabPTFU(2,i) &" AND act_con_codconPTF = "& TabPTFU(3,i) &" ;"

Set RSupdatePTFU = OBJdBportConn.Execute(SQLIngPTFU)

Merci

13 réponses

zekabyle Messages postés 28 Date d'inscription lundi 6 mars 2006 Statut Membre Dernière intervention 2 janvier 2007
9 mai 2006 à 16:06
TabPTFU(1,i) , TabPTFU(2,i) et TabPTFU(3,i) sont des entiers.
TabPTFU(0,i) est une chaîne.
TabPTFU(4,i) est un réel que j'ai transformé en chaîne.

merci
3
aieeeuuuuu Messages postés 698 Date d'inscription jeudi 16 janvier 2003 Statut Membre Dernière intervention 20 mai 2011 3
9 mai 2006 à 11:22
salut

je ne sais pas si c'est une erreur de copier coller, mais il me semble qu'il te manque des doubles quotes autour de ton
TabPTFU(4,i)
0
zekabyle Messages postés 28 Date d'inscription lundi 6 mars 2006 Statut Membre Dernière intervention 2 janvier 2007
9 mai 2006 à 16:01
c une erreur de copier-coller.
Voici mon bout de code

TabPTFU(4,i)= CStr(TabPTFU(4,i)) SQLIngPTFU "UPDATE activitePTF SET act_nbjourpPTF '"& TabPTFU(4,i) &"' WHERE act_moi_moisPTF = '"& TabPTFU(0,i) &"' AND act_tac_codact = "& TabPTFU(1,i) &" AND act_ing_codingPTF = "& TabPTFU(2,i) &" AND act_con_codconPTF = "& TabPTFU(3,i) &";"
0
aieeeuuuuu Messages postés 698 Date d'inscription jeudi 16 janvier 2003 Statut Membre Dernière intervention 20 mai 2011 3
9 mai 2006 à 17:05
peux tu mettre un point d'arret et nous donner la requete finale (sans les variables) ?

on pourra mieux voir ce que ca donne.

l'erreur que tu as c'est une erreur SQL ? ou un erreur VB ?

d'autre part attention, quand tu fait
TabPTFU(4,i)=CStr(TabPTFU(4,i))

ca ne change pas le type de TabPTFU(4,i) !!!
si TabPTFU(4,i) est de type int, ca revient a faire Cint(Cstr(TabPTFU(4,i))


au fait, c'est sur quelle ligne exactement que ca plante ?
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
zekabyle Messages postés 28 Date d'inscription lundi 6 mars 2006 Statut Membre Dernière intervention 2 janvier 2007
10 mai 2006 à 09:46
c'est juste une erreur dans l'écriture du champ act_tac_codactPTF car act_tac_codact ne fait pas partie de la table que j'utilise c une erreur de recopiage de champ.
Mais ça rame énormément quand j'exécute mon code.
J'utilise des bases access avec plus de 20400 lignes dans les tables concernées activitePTF et aussi activite. Je suis sûr que mon morceau de code n'est pas optimisé mais ça rame tellement que ça dépasse le délai de connexion imposé.
Voici mon code :
<%@ Language=VBScript %> <%@ Language=VBScript %> <%@ Language=VBScript %> <%@ Language=VBScript %> <!--#include file="includes/utils.asp"
--><%

dim i,j,k

'variable me permettant de me connecter à la base DispoPTF
dim OBJdBportConn

'phase 0
dim OBJdBConnPTFU

dim OBJdBConnPTFL

dim RSPTFU

dim TabPTFU

dim RSPTFL

dim TabPTFL

dim RSIngPTFU

dim TabIngPTFU

dim SQLIngPTFU

dim RSupdatePTFU

dim test

dim SQL

dim TabMAJ

'3)partie mise à jour de la table activitePTF

Set OBJdBConnPTFU = Server.CreateObject("ADODB.Connection")
OBJdBConnPTFU.Open cheminbaseDispoPTF_U

Set RSPTFU = OBJdBConnPTFU.Execute ("SELECT * FROM activite WHERE act_con_codcon <> 0;")
if not RSPTFU.EOF then
TabPTFU = RSPTFU.GetRows
end if

RSPTFU.Close
Set RSPTFU = nothing

OBJdBConnPTFU.Close
Set OBJdBConnPTFU = nothing



'ouverture de la base DispoPTF
Set OBJdBportConn = Server.CreateObject("ADODB.Connection")
OBJdBportConn.Open cheminbaseDispoPTF

'ouverture de la table activitePTF de la base DispoPTF
Set RSIngPTFU = OBJdBportConn.Execute ("SELECT * FROM activitePTF WHERE act_con_codconPTF <> 0;")

'redimension du tableau TabMAJ
redim TabMAJ(8,1)

'initialisation du tableau TabMAJ
TabMAJ(0,0) = ""
TabMAJ(1,0) = ""
TabMAJ(2,0) = ""
TabMAJ(3,0) = ""
TabMAJ(4,0) = ""
TabMAJ(5,0) = ""
TabMAJ(6,0) = ""
TabMAJ(7,0) = ""

k = 1

'stockage dans un tableau
'DispoPTF et dispo
do while not RSIngPTFU.EOF
for i = 0 to ubound(TabPTFU,2)
if RSIngPTFU("act_moi_moisPTF") = TabPTFU(0,i) then
if RSIngPTFU("act_tac_codactPTF") = TabPTFU(1,i) then
if RSIngPTFU("act_ing_codingPTF") = TabPTFU(2,i) then
if RSIngPTFU("act_con_codconPTF") = TabPTFU(3,i) then
if RSIngPTFU("act_nbjourpPTF") <> TabPTFU(4,i) then
TabMAJ(0,j) = TabPTFU(0,i)
TabMAJ(1,j) = TabPTFU(1,i)
TabMAJ(2,j) = TabPTFU(2,i)
TabMAJ(3,j) = TabPTFU(3,i)
TabMAJ(4,j) = TabPTFU(4,i)
'TabMAJ(5,j) = TabPTFU(5,i)
'TabMAJ(6,j) = TabPTFU(6,i)
'TabMAJ(7,j) = TabPTFU(7,i)

redim preserve TabMAJ(8,k)
k = k + 1
j = j + 1
end if
end if
end if
end if
end if
next
RSIngPTFU.movenext
loop

'fermeture de la table INGENIEUR de la base dispo
RSIngPTFU.Close
Set RSIngPTFU = nothing

'fermeture de la base DispoPTF
OBJdBportConn.Close
Set OBJdBportConn = nothing

'désalloue le tableau TabIngPort pour libérer de la mémoire
erase TabPTFU

'ouverture de la base DispoPTF
Set OBJdBportConn = Server.CreateObject("ADODB.Connection")
OBJdBportConn.Open cheminbaseDispoPTF

'ouverture de la table activitePTF de la base DispoPTF
Set RSIngPTFU = OBJdBportConn.Execute ("SELECT * FROM activitePTF WHERE act_con_codconPTF <> 0;")

'mise à jour de la table activitePTF
do while not RSIngPTFU.EOF
for i = 0 to ubound(TabMAJ,2)
if RSIngPTFU("act_moi_moisPTF") = TabMAJ(0,i) then
if RSIngPTFU("act_tac_codactPTF") = TabMAJ(1,i) then
if RSIngPTFU("act_ing_codingPTF") = TabMAJ(2,i) then
if RSIngPTFU("act_con_codconPTF") = TabMAJ(3,i) then
TabMAJ(4,i) = CStr(TabMAJ(4,i))
'TabMAJ(5,i) = CStr(TabMAJ(5,i))
'TabMAJ(6,i) = CStr(TabMAJ(6,i))
'TabMAJ(7,i) = CStr(TabMAJ(7,i))
'on utilise la requête SQL de mise à jour dans la table activitePTF de la base dispoPTF
SQLIngPTFU "UPDATE activitePTF SET act_nbjourpPTF '"& test &"' WHERE act_moi_moisPTF = '"& TabMAJ(0,i) &"' AND act_tac_codactPTF = "& TabMAJ(1,i) &" AND act_ing_codingPTF = "& TabMAJ(2,i) &" AND act_con_codconPTF = "& TabMAJ(3,i) &";"
Set RSupdatePTFU = OBJdBportConn.Execute(SQLIngPTFU)
Set RSupdatePTFU = nothing
i = 0
exit for
end if
end if
end if
end if
next
RSIngPTFU.movenext
loop

erase TabMAJ

'fermeture de la table activitePTF de la base DispoPTF
RSIngPTFU.Close
Set RSIngPTFU = nothing

'fermeture de la base DispoPTF
OBJdBportConn.Close
Set OBJdBportConn = nothing
%><!--#include file="includes/utils.asp"
--><%

dim i,j,k

'variable me permettant de me connecter à la base DispoPTF
dim OBJdBportConn

'phase 0
dim OBJdBConnPTFU

dim OBJdBConnPTFL

dim RSPTFU

dim TabPTFU

dim RSPTFL

dim TabPTFL

dim RSIngPTFU

dim TabIngPTFU

dim SQLIngPTFU

dim RSupdatePTFU

dim test

dim SQL

dim TabMAJ

'3)partie mise à jour de la table activitePTF

Set OBJdBConnPTFU = Server.CreateObject("ADODB.Connection")
OBJdBConnPTFU.Open cheminbaseDispoPTF_U

Set RSPTFU = OBJdBConnPTFU.Execute ("SELECT * FROM activite WHERE act_con_codcon <> 0;")
if not RSPTFU.EOF then
TabPTFU = RSPTFU.GetRows
end if

RSPTFU.Close
Set RSPTFU = nothing

OBJdBConnPTFU.Close
Set OBJdBConnPTFU = nothing



'ouverture de la base DispoPTF
Set OBJdBportConn = Server.CreateObject("ADODB.Connection")
OBJdBportConn.Open cheminbaseDispoPTF

'ouverture de la table activitePTF de la base DispoPTF
Set RSIngPTFU = OBJdBportConn.Execute ("SELECT * FROM activitePTF WHERE act_con_codconPTF <> 0;")

'redimension du tableau TabMAJ
redim TabMAJ(8,1)

'initialisation du tableau TabMAJ
TabMAJ(0,0) = ""
TabMAJ(1,0) = ""
TabMAJ(2,0) = ""
TabMAJ(3,0) = ""
TabMAJ(4,0) = ""
TabMAJ(5,0) = ""
TabMAJ(6,0) = ""
TabMAJ(7,0) = ""

k = 1

'stockage dans un tableau
'DispoPTF et dispo
do while not RSIngPTFU.EOF
for i = 0 to ubound(TabPTFU,2)
if RSIngPTFU("act_moi_moisPTF") = TabPTFU(0,i) then
if RSIngPTFU("act_tac_codactPTF") = TabPTFU(1,i) then
if RSIngPTFU("act_ing_codingPTF") = TabPTFU(2,i) then
if RSIngPTFU("act_con_codconPTF") = TabPTFU(3,i) then
if RSIngPTFU("act_nbjourpPTF") <> TabPTFU(4,i) then
TabMAJ(0,j) = TabPTFU(0,i)
TabMAJ(1,j) = TabPTFU(1,i)
TabMAJ(2,j) = TabPTFU(2,i)
TabMAJ(3,j) = TabPTFU(3,i)
TabMAJ(4,j) = TabPTFU(4,i)
'TabMAJ(5,j) = TabPTFU(5,i)
'TabMAJ(6,j) = TabPTFU(6,i)
'TabMAJ(7,j) = TabPTFU(7,i)

redim preserve TabMAJ(8,k)
k = k + 1
j = j + 1
end if
end if
end if
end if
end if
next
RSIngPTFU.movenext
loop

'fermeture de la table INGENIEUR de la base dispo
RSIngPTFU.Close
Set RSIngPTFU = nothing

'fermeture de la base DispoPTF
OBJdBportConn.Close
Set OBJdBportConn = nothing

'désalloue le tableau TabIngPort pour libérer de la mémoire
erase TabPTFU

'ouverture de la base DispoPTF
Set OBJdBportConn = Server.CreateObject("ADODB.Connection")
OBJdBportConn.Open cheminbaseDispoPTF

'ouverture de la table activitePTF de la base DispoPTF
Set RSIngPTFU = OBJdBportConn.Execute ("SELECT * FROM activitePTF WHERE act_con_codconPTF <> 0;")

'mise à jour de la table activitePTF
do while not RSIngPTFU.EOF
for i = 0 to ubound(TabMAJ,2)
if RSIngPTFU("act_moi_moisPTF") = TabMAJ(0,i) then
if RSIngPTFU("act_tac_codactPTF") = TabMAJ(1,i) then
if RSIngPTFU("act_ing_codingPTF") = TabMAJ(2,i) then
if RSIngPTFU("act_con_codconPTF") = TabMAJ(3,i) then
TabMAJ(4,i) = CStr(TabMAJ(4,i))
'TabMAJ(5,i) = CStr(TabMAJ(5,i))
'TabMAJ(6,i) = CStr(TabMAJ(6,i))
'TabMAJ(7,i) = CStr(TabMAJ(7,i))
'on utilise la requête SQL de mise à jour dans la table activitePTF de la base dispoPTF
SQLIngPTFU "UPDATE activitePTF SET act_nbjourpPTF '"& test &"' WHERE act_moi_moisPTF = '"& TabMAJ(0,i) &"' AND act_tac_codactPTF = "& TabMAJ(1,i) &" AND act_ing_codingPTF = "& TabMAJ(2,i) &" AND act_con_codconPTF = "& TabMAJ(3,i) &";"
Set RSupdatePTFU = OBJdBportConn.Execute(SQLIngPTFU)
Set RSupdatePTFU = nothing
i = 0
exit for
end if
end if
end if
end if
next
RSIngPTFU.movenext
loop

erase TabMAJ

'fermeture de la table activitePTF de la base DispoPTF
RSIngPTFU.Close
Set RSIngPTFU = nothing

'fermeture de la base DispoPTF
OBJdBportConn.Close
Set OBJdBportConn = nothing
%><!--#include file="includes/utils.asp"
--><%

dim i,j,k

'variable me permettant de me connecter à la base DispoPTF
dim OBJdBportConn

'phase 0
dim OBJdBConnPTFU

dim OBJdBConnPTFL

dim RSPTFU

dim TabPTFU

dim RSPTFL

dim TabPTFL

dim RSIngPTFU

dim TabIngPTFU

dim SQLIngPTFU

dim RSupdatePTFU

dim test

dim SQL

dim TabMAJ

'3)partie mise à jour de la table activitePTF

Set OBJdBConnPTFU = Server.CreateObject("ADODB.Connection")
OBJdBConnPTFU.Open cheminbaseDispoPTF_U

Set RSPTFU = OBJdBConnPTFU.Execute ("SELECT * FROM activite WHERE act_con_codcon <> 0;")
if not RSPTFU.EOF then
TabPTFU = RSPTFU.GetRows
end if

RSPTFU.Close
Set RSPTFU = nothing

OBJdBConnPTFU.Close
Set OBJdBConnPTFU = nothing



'ouverture de la base DispoPTF
Set OBJdBportConn = Server.CreateObject("ADODB.Connection")
OBJdBportConn.Open cheminbaseDispoPTF

'ouverture de la table activitePTF de la base DispoPTF
Set RSIngPTFU = OBJdBportConn.Execute ("SELECT * FROM activitePTF WHERE act_con_codconPTF <> 0;")

'redimension du tableau TabMAJ
redim TabMAJ(8,1)

'initialisation du tableau TabMAJ
TabMAJ(0,0) = ""
TabMAJ(1,0) = ""
TabMAJ(2,0) = ""
TabMAJ(3,0) = ""
TabMAJ(4,0) = ""
TabMAJ(5,0) = ""
TabMAJ(6,0) = ""
TabMAJ(7,0) = ""

k = 1

'stockage dans un tableau
'DispoPTF et dispo
do while not RSIngPTFU.EOF
for i = 0 to ubound(TabPTFU,2)
if RSIngPTFU("act_moi_moisPTF") = TabPTFU(0,i) then
if RSIngPTFU("act_tac_codactPTF") = TabPTFU(1,i) then
if RSIngPTFU("act_ing_codingPTF") = TabPTFU(2,i) then
if RSIngPTFU("act_con_codconPTF") = TabPTFU(3,i) then
if RSIngPTFU("act_nbjourpPTF") <> TabPTFU(4,i) then
TabMAJ(0,j) = TabPTFU(0,i)
TabMAJ(1,j) = TabPTFU(1,i)
TabMAJ(2,j) = TabPTFU(2,i)
TabMAJ(3,j) = TabPTFU(3,i)
TabMAJ(4,j) = TabPTFU(4,i)
'TabMAJ(5,j) = TabPTFU(5,i)
'TabMAJ(6,j) = TabPTFU(6,i)
'TabMAJ(7,j) = TabPTFU(7,i)

redim preserve TabMAJ(8,k)
k = k + 1
j = j + 1
end if
end if
end if
end if
end if
next
RSIngPTFU.movenext
loop

'fermeture de la table INGENIEUR de la base dispo
RSIngPTFU.Close
Set RSIngPTFU = nothing

'fermeture de la base DispoPTF
OBJdBportConn.Close
Set OBJdBportConn = nothing

'désalloue le tableau TabIngPort pour libérer de la mémoire
erase TabPTFU

'ouverture de la base DispoPTF
Set OBJdBportConn = Server.CreateObject("ADODB.Connection")
OBJdBportConn.Open cheminbaseDispoPTF

'ouverture de la table activitePTF de la base DispoPTF
Set RSIngPTFU = OBJdBportConn.Execute ("SELECT * FROM activitePTF WHERE act_con_codconPTF <> 0;")

'mise à jour de la table activitePTF
do while not RSIngPTFU.EOF
for i = 0 to ubound(TabMAJ,2)
if RSIngPTFU("act_moi_moisPTF") = TabMAJ(0,i) then
if RSIngPTFU("act_tac_codactPTF") = TabMAJ(1,i) then
if RSIngPTFU("act_ing_codingPTF") = TabMAJ(2,i) then
if RSIngPTFU("act_con_codconPTF") = TabMAJ(3,i) then
TabMAJ(4,i) = CStr(TabMAJ(4,i))
'TabMAJ(5,i) = CStr(TabMAJ(5,i))
'TabMAJ(6,i) = CStr(TabMAJ(6,i))
'TabMAJ(7,i) = CStr(TabMAJ(7,i))
'on utilise la requête SQL de mise à jour dans la table activitePTF de la base dispoPTF
SQLIngPTFU "UPDATE activitePTF SET act_nbjourpPTF '"& test &"' WHERE act_moi_moisPTF = '"& TabMAJ(0,i) &"' AND act_tac_codactPTF = "& TabMAJ(1,i) &" AND act_ing_codingPTF = "& TabMAJ(2,i) &" AND act_con_codconPTF = "& TabMAJ(3,i) &";"
Set RSupdatePTFU = OBJdBportConn.Execute(SQLIngPTFU)
Set RSupdatePTFU = nothing
i = 0
exit for
end if
end if
end if
end if
next
RSIngPTFU.movenext
loop

erase TabMAJ

'fermeture de la table activitePTF de la base DispoPTF
RSIngPTFU.Close
Set RSIngPTFU = nothing

'fermeture de la base DispoPTF
OBJdBportConn.Close
Set OBJdBportConn = nothing
%><!--#include file="includes/utils.asp"
--><%

dim i,j,k

'variable me permettant de me connecter à la base DispoPTF
dim OBJdBportConn

'phase 0
dim OBJdBConnPTFU

dim OBJdBConnPTFL

dim RSPTFU

dim TabPTFU

dim RSPTFL

dim TabPTFL

dim RSIngPTFU

dim TabIngPTFU

dim SQLIngPTFU

dim RSupdatePTFU

dim test

dim SQL

dim TabMAJ

'3)partie mise à jour de la table activitePTF

Set OBJdBConnPTFU = Server.CreateObject("ADODB.Connection")
OBJdBConnPTFU.Open cheminbaseDispoPTF_U

Set RSPTFU = OBJdBConnPTFU.Execute ("SELECT * FROM activite WHERE act_con_codcon <> 0;")
if not RSPTFU.EOF then
TabPTFU = RSPTFU.GetRows
end if

RSPTFU.Close
Set RSPTFU = nothing

OBJdBConnPTFU.Close
Set OBJdBConnPTFU = nothing



'ouverture de la base DispoPTF
Set OBJdBportConn = Server.CreateObject("ADODB.Connection")
OBJdBportConn.Open cheminbaseDispoPTF

'ouverture de la table activitePTF de la base DispoPTF
Set RSIngPTFU = OBJdBportConn.Execute ("SELECT * FROM activitePTF WHERE act_con_codconPTF <> 0;")

'redimension du tableau TabMAJ
redim TabMAJ(8,1)

'initialisation du tableau TabMAJ
TabMAJ(0,0) = ""
TabMAJ(1,0) = ""
TabMAJ(2,0) = ""
TabMAJ(3,0) = ""
TabMAJ(4,0) = ""
TabMAJ(5,0) = ""
TabMAJ(6,0) = ""
TabMAJ(7,0) = ""

k = 1

'stockage dans un tableau
'DispoPTF et dispo
do while not RSIngPTFU.EOF
for i = 0 to ubound(TabPTFU,2)
if RSIngPTFU("act_moi_moisPTF") = TabPTFU(0,i) then
if RSIngPTFU("act_tac_codactPTF") = TabPTFU(1,i) then
if RSIngPTFU("act_ing_codingPTF") = TabPTFU(2,i) then
if RSIngPTFU("act_con_codconPTF") = TabPTFU(3,i) then
if RSIngPTFU("act_nbjourpPTF") <> TabPTFU(4,i) then
TabMAJ(0,j) = TabPTFU(0,i)
TabMAJ(1,j) = TabPTFU(1,i)
TabMAJ(2,j) = TabPTFU(2,i)
TabMAJ(3,j) = TabPTFU(3,i)
TabMAJ(4,j) = TabPTFU(4,i)
'TabMAJ(5,j) = TabPTFU(5,i)
'TabMAJ(6,j) = TabPTFU(6,i)
'TabMAJ(7,j) = TabPTFU(7,i)

redim preserve TabMAJ(8,k)
k = k + 1
j = j + 1
end if
end if
end if
end if
end if
next
RSIngPTFU.movenext
loop

'fermeture de la table INGENIEUR de la base dispo
RSIngPTFU.Close
Set RSIngPTFU = nothing

'fermeture de la base DispoPTF
OBJdBportConn.Close
Set OBJdBportConn = nothing

'désalloue le tableau TabIngPort pour libérer de la mémoire
erase TabPTFU

'ouverture de la base DispoPTF
Set OBJdBportConn = Server.CreateObject("ADODB.Connection")
OBJdBportConn.Open cheminbaseDispoPTF

'ouverture de la table activitePTF de la base DispoPTF
Set RSIngPTFU = OBJdBportConn.Execute ("SELECT * FROM activitePTF WHERE act_con_codconPTF <> 0;")

'mise à jour de la table activitePTF
do while not RSIngPTFU.EOF
for i = 0 to ubound(TabMAJ,2)
if RSIngPTFU("act_moi_moisPTF") = TabMAJ(0,i) then
if RSIngPTFU("act_tac_codactPTF") = TabMAJ(1,i) then
if RSIngPTFU("act_ing_codingPTF") = TabMAJ(2,i) then
if RSIngPTFU("act_con_codconPTF") = TabMAJ(3,i) then
TabMAJ(4,i) = CStr(TabMAJ(4,i))
'TabMAJ(5,i) = CStr(TabMAJ(5,i))
'TabMAJ(6,i) = CStr(TabMAJ(6,i))
'TabMAJ(7,i) = CStr(TabMAJ(7,i))
'on utilise la requête SQL de mise à jour dans la table activitePTF de la base dispoPTF
SQLIngPTFU "UPDATE activitePTF SET act_nbjourpPTF '"& test &"' WHERE act_moi_moisPTF = '"& TabMAJ(0,i) &"' AND act_tac_codactPTF = "& TabMAJ(1,i) &" AND act_ing_codingPTF = "& TabMAJ(2,i) &" AND act_con_codconPTF = "& TabMAJ(3,i) &";"
Set RSupdatePTFU = OBJdBportConn.Execute(SQLIngPTFU)
Set RSupdatePTFU = nothing
i = 0
exit for
end if
end if
end if
end if
next
RSIngPTFU.movenext
loop

erase TabMAJ

'fermeture de la table activitePTF de la base DispoPTF
RSIngPTFU.Close
Set RSIngPTFU = nothing

'fermeture de la base DispoPTF
OBJdBportConn.Close
Set OBJdBportConn = nothing
%>
<%@ Language=VBScript %><!--#include file="includes/utils.asp"
--><%

dim i,j,k

'variable me permettant de me connecter à la base DispoPTF
dim OBJdBportConn

'phase 0
dim OBJdBConnPTFU

dim OBJdBConnPTFL

dim RSPTFU

dim TabPTFU

dim RSPTFL

dim TabPTFL

dim RSIngPTFU

dim TabIngPTFU

dim SQLIngPTFU

dim RSupdatePTFU

dim test

dim SQL

dim TabMAJ

'3)partie mise à jour de la table activitePTF

Set OBJdBConnPTFU = Server.CreateObject("ADODB.Connection")
OBJdBConnPTFU.Open cheminbaseDispoPTF_U

Set RSPTFU = OBJdBConnPTFU.Execute ("SELECT * FROM activite WHERE act_con_codcon <> 0;")
if not RSPTFU.EOF then
TabPTFU = RSPTFU.GetRows
end if

RSPTFU.Close
Set RSPTFU = nothing

OBJdBConnPTFU.Close
Set OBJdBConnPTFU = nothing



'ouverture de la base DispoPTF
Set OBJdBportConn = Server.CreateObject("ADODB.Connection")
OBJdBportConn.Open cheminbaseDispoPTF

'ouverture de la table activitePTF de la base DispoPTF
Set RSIngPTFU = OBJdBportConn.Execute ("SELECT * FROM activitePTF WHERE act_con_codconPTF <> 0;")

'redimension du tableau TabMAJ
redim TabMAJ(8,1)

'initialisation du tableau TabMAJ
TabMAJ(0,0) = ""
TabMAJ(1,0) = ""
TabMAJ(2,0) = ""
TabMAJ(3,0) = ""
TabMAJ(4,0) = ""
TabMAJ(5,0) = ""
TabMAJ(6,0) = ""
TabMAJ(7,0) = ""

k = 1

'stockage dans un tableau
'DispoPTF et dispo
do while not RSIngPTFU.EOF
for i = 0 to ubound(TabPTFU,2)
if RSIngPTFU("act_moi_moisPTF") = TabPTFU(0,i) then
if RSIngPTFU("act_tac_codactPTF") = TabPTFU(1,i) then
if RSIngPTFU("act_ing_codingPTF") = TabPTFU(2,i) then
if RSIngPTFU("act_con_codconPTF") = TabPTFU(3,i) then
if RSIngPTFU("act_nbjourpPTF") <> TabPTFU(4,i) then
TabMAJ(0,j) = TabPTFU(0,i)
TabMAJ(1,j) = TabPTFU(1,i)
TabMAJ(2,j) = TabPTFU(2,i)
TabMAJ(3,j) = TabPTFU(3,i)
TabMAJ(4,j) = TabPTFU(4,i)
'TabMAJ(5,j) = TabPTFU(5,i)
'TabMAJ(6,j) = TabPTFU(6,i)
'TabMAJ(7,j) = TabPTFU(7,i)

redim preserve TabMAJ(8,k)
k = k + 1
j = j + 1
end if
end if
end if
end if
end if
next
RSIngPTFU.movenext
loop

'fermeture de la table INGENIEUR de la base dispo
RSIngPTFU.Close
Set RSIngPTFU = nothing

'fermeture de la base DispoPTF
OBJdBportConn.Close
Set OBJdBportConn = nothing

'désalloue le tableau TabIngPort pour libérer de la mémoire
erase TabPTFU

'ouverture de la base DispoPTF
Set OBJdBportConn = Server.CreateObject("ADODB.Connection")
OBJdBportConn.Open cheminbaseDispoPTF

'ouverture de la table activitePTF de la base DispoPTF
Set RSIngPTFU = OBJdBportConn.Execute ("SELECT * FROM activitePTF WHERE act_con_codconPTF <> 0;")

'mise à jour de la table activitePTF
do while not RSIngPTFU.EOF
for i = 0 to ubound(TabMAJ,2)
if RSIngPTFU("act_moi_moisPTF") = TabMAJ(0,i) then
if RSIngPTFU("act_tac_codactPTF") = TabMAJ(1,i) then
if RSIngPTFU("act_ing_codingPTF") = TabMAJ(2,i) then
if RSIngPTFU("act_con_codconPTF") = TabMAJ(3,i) then
TabMAJ(4,i) = CStr(TabMAJ(4,i))
'TabMAJ(5,i) = CStr(TabMAJ(5,i))
'TabMAJ(6,i) = CStr(TabMAJ(6,i))
'TabMAJ(7,i) = CStr(TabMAJ(7,i))
'on utilise la requête SQL de mise à jour dans la table activitePTF de la base dispoPTF
SQLIngPTFU "UPDATE activitePTF SET act_nbjourpPTF '"& test &"' WHERE act_moi_moisPTF = '"& TabMAJ(0,i) &"' AND act_tac_codactPTF = "& TabMAJ(1,i) &" AND act_ing_codingPTF = "& TabMAJ(2,i) &" AND act_con_codconPTF = "& TabMAJ(3,i) &";"
Set RSupdatePTFU = OBJdBportConn.Execute(SQLIngPTFU)
Set RSupdatePTFU = nothing
i = 0
exit for
end if
end if
end if
end if
next
RSIngPTFU.movenext
loop

erase TabMAJ

'fermeture de la table activitePTF de la base DispoPTF
RSIngPTFU.Close
Set RSIngPTFU = nothing

'fermeture de la base DispoPTF
OBJdBportConn.Close
Set OBJdBportConn = nothing
%>Set OBJdBConnPTFU = Server.CreateObject("ADODB.Connection")
OBJdBConnPTFU.Open cheminbaseDispoPTF_U
Set RSPTFU = OBJdBConnPTFU.Execute ("SELECT * FROM activite WHERE act_con_codcon <> 0;")
if not RSPTFU.EOF then
TabPTFU = RSPTFU.GetRows
end if
RSPTFU.Close
Set RSPTFU = nothing
OBJdBConnPTFU.Close
Set OBJdBConnPTFU = nothing
'ouverture de la base DispoPTF
Set OBJdBportConn = Server.CreateObject("ADODB.Connection")
OBJdBportConn.Open cheminbaseDispoPTF
'ouverture de la table activitePTF de la base DispoPTF
Set RSIngPTFU = OBJdBportConn.Execute ("SELECT * FROM activitePTF WHERE act_con_codconPTF <> 0;")
'redimension du tableau
TabMAJ redim TabMAJ(8,1)
'initialisation du tableau TabMAJ
TabMAJ(0,0) = ""
TabMAJ(1,0) = ""
TabMAJ(2,0) = ""
TabMAJ(3,0) = ""
TabMAJ(4,0) = ""
TabMAJ(5,0) = ""
TabMAJ(6,0) = ""
TabMAJ(7,0) = ""
k = 1
'stockage dans un tableau 'DispoPTF et dispo
do while not RSIngPTFU.EOF
for i = 0 to ubound(TabPTFU,2)
if RSIngPTFU("act_moi_moisPTF") = TabPTFU(0,i) then
if RSIngPTFU("act_tac_codactPTF") = TabPTFU(1,i) then
if RSIngPTFU("act_ing_codingPTF") = TabPTFU(2,i) then
if RSIngPTFU("act_con_codconPTF") = TabPTFU(3,i) then
if RSIngPTFU("act_nbjourpPTF") <> TabPTFU(4,i) then
TabMAJ(0,j) = TabPTFU(0,i)
TabMAJ(1,j) = TabPTFU(1,i)
TabMAJ(2,j) = TabPTFU(2,i)
TabMAJ(3,j) = TabPTFU(3,i)
TabMAJ(4,j) = TabPTFU(4,i)
redim preserve TabMAJ(8,k)
k = k + 1
j = j + 1
end if
end if
end if
end if
end if
next
RSIngPTFU.movenext
loop
'fermeture de la table INGENIEUR de la base dispo
RSIngPTFU.Close
Set RSIngPTFU = nothing
'fermeture de la base DispoPTF
OBJdBportConn.Close
Set OBJdBportConn = nothing
'désalloue le tableau TabIngPort pour libérer de la mémoire
erase TabPTFU
'ouverture de la base DispoPTF
Set OBJdBportConn = Server.CreateObject("ADODB.Connection")
OBJdBportConn.Open cheminbaseDispoPTF
'ouverture de la table activitePTF de la base DispoPTF
Set RSIngPTFU = OBJdBportConn.Execute ("SELECT * FROM activitePTF WHERE act_con_codconPTF <> 0;")
'mise à jour de la table activitePTF
do while not RSIngPTFU.EOF
for i = 0 to ubound(TabMAJ,2)
if RSIngPTFU("act_moi_moisPTF") = TabMAJ(0,i) then
if RSIngPTFU("act_tac_codactPTF") = TabMAJ(1,i) then
if RSIngPTFU("act_ing_codingPTF") = TabMAJ(2,i) then
if RSIngPTFU("act_con_codconPTF") = TabMAJ(3,i) then
TabMAJ(4,i) = CStr(TabMAJ(4,i)) 'on utilise la requête SQL de mise à jour dans la table activitePTF de la base dispoPTF SQLIngPTFU "UPDATE activitePTF SET act_nbjourpPTF '"& test &"' WHERE act_moi_moisPTF = '"& TabMAJ(0,i) &"' AND act_tac_codactPTF = "& TabMAJ(1,i) &" AND act_ing_codingPTF = "& TabMAJ(2,i) &" AND act_con_codconPTF = "& TabMAJ(3,i) &";"
Set RSupdatePTFU = OBJdBportConn.Execute(SQLIngPTFU)
Set RSupdatePTFU = nothing
i = 0
exit for
end if
end if
end if
end if
next
RSIngPTFU.movenext
loop
erase TabMAJ
'fermeture de la table activitePTF de la base DispoPTF
RSIngPTFU.Close
Set RSIngPTFU = nothing
'fermeture de la base DispoPTF
OBJdBportConn.Close
Set OBJdBportConn = nothing

je suis désolé de mettre autant de lignes
merci
<%@ Language=VBScript %><%@ Language=VBScript %><!--#include file="includes/utils.asp"
--><%

dim i,j,k

'variable me permettant de me connecter à la base DispoPTF
dim OBJdBportConn

'phase 0
dim OBJdBConnPTFU

dim OBJdBConnPTFL

dim RSPTFU

dim TabPTFU

dim RSPTFL

dim TabPTFL

dim RSIngPTFU

dim TabIngPTFU

dim SQLIngPTFU

dim RSupdatePTFU

dim test

dim SQL

dim TabMAJ

'3)partie mise à jour de la table activitePTF

Set OBJdBConnPTFU = Server.CreateObject("ADODB.Connection")
OBJdBConnPTFU.Open cheminbaseDispoPTF_U

Set RSPTFU = OBJdBConnPTFU.Execute ("SELECT * FROM activite WHERE act_con_codcon <> 0;")
if not RSPTFU.EOF then
TabPTFU = RSPTFU.GetRows
end if

RSPTFU.Close
Set RSPTFU = nothing

OBJdBConnPTFU.Close
Set OBJdBConnPTFU = nothing



'ouverture de la base DispoPTF
Set OBJdBportConn = Server.CreateObject("ADODB.Connection")
OBJdBportConn.Open cheminbaseDispoPTF

'ouverture de la table activitePTF de la base DispoPTF
Set RSIngPTFU = OBJdBportConn.Execute ("SELECT * FROM activitePTF WHERE act_con_codconPTF <> 0;")

'redimension du tableau TabMAJ
redim TabMAJ(8,1)

'initialisation du tableau TabMAJ
TabMAJ(0,0) = ""
TabMAJ(1,0) = ""
TabMAJ(2,0) = ""
TabMAJ(3,0) = ""
TabMAJ(4,0) = ""
TabMAJ(5,0) = ""
TabMAJ(6,0) = ""
TabMAJ(7,0) = ""

k = 1

'stockage dans un tableau
'DispoPTF et dispo
do while not RSIngPTFU.EOF
for i = 0 to ubound(TabPTFU,2)
if RSIngPTFU("act_moi_moisPTF") = TabPTFU(0,i) then
if RSIngPTFU("act_tac_codactPTF") = TabPTFU(1,i) then
if RSIngPTFU("act_ing_codingPTF") = TabPTFU(2,i) then
if RSIngPTFU("act_con_codconPTF") = TabPTFU(3,i) then
if RSIngPTFU("act_nbjourpPTF") <> TabPTFU(4,i) then
TabMAJ(0,j) = TabPTFU(0,i)
TabMAJ(1,j) = TabPTFU(1,i)
TabMAJ(2,j) = TabPTFU(2,i)
TabMAJ(3,j) = TabPTFU(3,i)
TabMAJ(4,j) = TabPTFU(4,i)
'TabMAJ(5,j) = TabPTFU(5,i)
'TabMAJ(6,j) = TabPTFU(6,i)
'TabMAJ(7,j) = TabPTFU(7,i)

redim preserve TabMAJ(8,k)
k = k + 1
j = j + 1
end if
end if
end if
end if
end if
next
RSIngPTFU.movenext
loop

'fermeture de la table INGENIEUR de la base dispo
RSIngPTFU.Close
Set RSIngPTFU = nothing

'fermeture de la base DispoPTF
OBJdBportConn.Close
Set OBJdBportConn = nothing

'désalloue le tableau TabIngPort pour libérer de la mémoire
erase TabPTFU

'ouverture de la base DispoPTF
Set OBJdBportConn = Server.CreateObject("ADODB.Connection")
OBJdBportConn.Open cheminbaseDispoPTF

'ouverture de la table activitePTF de la base DispoPTF
Set RSIngPTFU = OBJdBportConn.Execute ("SELECT * FROM activitePTF WHERE act_con_codconPTF <> 0;")

'mise à jour de la table activitePTF
do while not RSIngPTFU.EOF
for i = 0 to ubound(TabMAJ,2)
if RSIngPTFU("act_moi_moisPTF") = TabMAJ(0,i) then
if RSIngPTFU("act_tac_codactPTF") = TabMAJ(1,i) then
if RSIngPTFU("act_ing_codingPTF") = TabMAJ(2,i) then
if RSIngPTFU("act_con_codconPTF") = TabMAJ(3,i) then
TabMAJ(4,i) = CStr(TabMAJ(4,i))
'TabMAJ(5,i) = CStr(TabMAJ(5,i))
'TabMAJ(6,i) = CStr(TabMAJ(6,i))
'TabMAJ(7,i) = CStr(TabMAJ(7,i))
'on utilise la requête SQL de mise à jour dans la table activitePTF de la base dispoPTF
SQLIngPTFU "UPDATE activitePTF SET act_nbjourpPTF '"& test &"' WHERE act_moi_moisPTF = '"& TabMAJ(0,i) &"' AND act_tac_codactPTF = "& TabMAJ(1,i) &" AND act_ing_codingPTF = "& TabMAJ(2,i) &" AND act_con_codconPTF = "& TabMAJ(3,i) &";"
Set RSupdatePTFU = OBJdBportConn.Execute(SQLIngPTFU)
Set RSupdatePTFU = nothing
i = 0
exit for
end if
end if
end if
end if
next
RSIngPTFU.movenext
loop

erase TabMAJ

'fermeture de la table activitePTF de la base DispoPTF
RSIngPTFU.Close
Set RSIngPTFU = nothing

'fermeture de la base DispoPTF
OBJdBportConn.Close
Set OBJdBportConn = nothing
%><!--#include file="includes/utils.asp"
--><%

dim i,j,k

'variable me permettant de me connecter à la base DispoPTF
dim OBJdBportConn

'phase 0
dim OBJdBConnPTFU

dim OBJdBConnPTFL

dim RSPTFU

dim TabPTFU

dim RSPTFL

dim TabPTFL

dim RSIngPTFU

dim TabIngPTFU

dim SQLIngPTFU

dim RSupdatePTFU

dim test

dim SQL

dim TabMAJ

'3)partie mise à jour de la table activitePTF

Set OBJdBConnPTFU = Server.CreateObject("ADODB.Connection")
OBJdBConnPTFU.Open cheminbaseDispoPTF_U

Set RSPTFU = OBJdBConnPTFU.Execute ("SELECT * FROM activite WHERE act_con_codcon <> 0;")
if not RSPTFU.EOF then
TabPTFU = RSPTFU.GetRows
end if

RSPTFU.Close
Set RSPTFU = nothing

OBJdBConnPTFU.Close
Set OBJdBConnPTFU = nothing



'ouverture de la base DispoPTF
Set OBJdBportConn = Server.CreateObject("ADODB.Connection")
OBJdBportConn.Open cheminbaseDispoPTF

'ouverture de la table activitePTF de la base DispoPTF
Set RSIngPTFU = OBJdBportConn.Execute ("SELECT * FROM activitePTF WHERE act_con_codconPTF <> 0;")

'redimension du tableau TabMAJ
redim TabMAJ(8,1)

'initialisation du tableau TabMAJ
TabMAJ(0,0) = ""
TabMAJ(1,0) = ""
TabMAJ(2,0) = ""
TabMAJ(3,0) = ""
TabMAJ(4,0) = ""
TabMAJ(5,0) = ""
TabMAJ(6,0) = ""
TabMAJ(7,0) = ""

k = 1

'stockage dans un tableau
'DispoPTF et dispo
do while not RSIngPTFU.EOF
for i = 0 to ubound(TabPTFU,2)
if RSIngPTFU("act_moi_moisPTF") = TabPTFU(0,i) then
if RSIngPTFU("act_tac_codactPTF") = TabPTFU(1,i) then
if RSIngPTFU("act_ing_codingPTF") = TabPTFU(2,i) then
if RSIngPTFU("act_con_codconPTF") = TabPTFU(3,i) then
if RSIngPTFU("act_nbjourpPTF") <> TabPTFU(4,i) then
TabMAJ(0,j) = TabPTFU(0,i)
TabMAJ(1,j) = TabPTFU(1,i)
TabMAJ(2,j) = TabPTFU(2,i)
TabMAJ(3,j) = TabPTFU(3,i)
TabMAJ(4,j) = TabPTFU(4,i)
'TabMAJ(5,j) = TabPTFU(5,i)
'TabMAJ(6,j) = TabPTFU(6,i)
'TabMAJ(7,j) = TabPTFU(7,i)

redim preserve TabMAJ(8,k)
k = k + 1
j = j + 1
end if
end if
end if
end if
end if
next
RSIngPTFU.movenext
loop

'fermeture de la table INGENIEUR de la base dispo
RSIngPTFU.Close
Set RSIngPTFU = nothing

'fermeture de la base DispoPTF
OBJdBportConn.Close
Set OBJdBportConn = nothing

'désalloue le tableau TabIngPort pour libérer de la mémoire
erase TabPTFU

'ouverture de la base DispoPTF
Set OBJdBportConn = Server.CreateObject("ADODB.Connection")
OBJdBportConn.Open cheminbaseDispoPTF

'ouverture de la table activitePTF de la base DispoPTF
Set RSIngPTFU = OBJdBportConn.Execute ("SELECT * FROM activitePTF WHERE act_con_codconPTF <> 0;")

'mise à jour de la table activitePTF
do while not RSIngPTFU.EOF
for i = 0 to ubound(TabMAJ,2)
if RSIngPTFU("act_moi_moisPTF") = TabMAJ(0,i) then
if RSIngPTFU("act_tac_codactPTF") = TabMAJ(1,i) then
if RSIngPTFU("act_ing_codingPTF") = TabMAJ(2,i) then
if RSIngPTFU("act_con_codconPTF") = TabMAJ(3,i) then
TabMAJ(4,i) = CStr(TabMAJ(4,i))
'TabMAJ(5,i) = CStr(TabMAJ(5,i))
'TabMAJ(6,i) = CStr(TabMAJ(6,i))
'TabMAJ(7,i) = CStr(TabMAJ(7,i))
'on utilise la requête SQL de mise à jour dans la table activitePTF de la base dispoPTF
SQLIngPTFU "UPDATE activitePTF SET act_nbjourpPTF '"& test &"' WHERE act_moi_moisPTF = '"& TabMAJ(0,i) &"' AND act_tac_codactPTF = "& TabMAJ(1,i) &" AND act_ing_codingPTF = "& TabMAJ(2,i) &" AND act_con_codconPTF = "& TabMAJ(3,i) &";"
Set RSupdatePTFU = OBJdBportConn.Execute(SQLIngPTFU)
Set RSupdatePTFU = nothing
i = 0
exit for
end if
end if
end if
end if
next
RSIngPTFU.movenext
loop

erase TabMAJ

'fermeture de la table activitePTF de la base DispoPTF
RSIngPTFU.Close
Set RSIngPTFU = nothing

'fermeture de la base DispoPTF
OBJdBportConn.Close
Set OBJdBportConn = nothing
%>
0
aieeeuuuuu Messages postés 698 Date d'inscription jeudi 16 janvier 2003 Statut Membre Dernière intervention 20 mai 2011 3
10 mai 2006 à 10:55
re,

alors premiere chose, ta serie de IF, tu peux les mettre ensemble en un seul IF. (IF ... AND ... AND... THEN)
ca ne sera pas vraiment plus rapide, mais plus lisible.

pour ce qui est du probleme de lenteur, est ce que tu as regardé quelle partie de ton code prenait le plus de temps ?

dans tous les cas, il me semble que les index n'existent pas sous access, mais je ne connais pas suffisement ce SGBDR pour pouvoir l'optimiser.

enfin dans tous les cas, a mon avis ce qui est long dans ton programme, c'est la boucle de mise a jour.

il y a peut etre moyen de faire autrement, mais pour ca il faut savoir ce qu'est censé faire ton programme.
peux tu nous expliquer brievement quel est le but ?
0
zekabyle Messages postés 28 Date d'inscription lundi 6 mars 2006 Statut Membre Dernière intervention 2 janvier 2007
10 mai 2006 à 14:17
je dois mettre à jour une table activitePTF d'une base Access DispoPTF.mdb à partir d'une table activite d'une autre base Access PTF_U.mdb.
les champs représentent les mêmes choses mais n'ont pas les mêmes noms,
j'ai 4 clés primaires avec possibilité de doublons qui sont les quatre premiers champs cités
.
table activitePTF:
act_moi_moisPTF :texte
act_tac_codactPTF:Entier
act_ing_codingPTF:Entier
act_con_codconPTF:Entier
act_nbjourpPTF:texte
act_nbjourfPTF:texte
act_prix_ventePTF:texte
act_prix_achatPTF:texte

table activite:
act_moi_mois :texte
act_tac_codact:Entier
act_ing_coding:Entier long
act_con_codcon:Entier long
act_nbjourp:réel
act_nbjourf:réel
act_prix_vente:réel
act_prix_achat:réel

ce qui m'intéresse est de mettre à jour act_nbjourpPTF à partir de act_nbjourp et je pense que je vais m'intéresser aux dates de la même année que la date actuelle.

extrait de la table activitePTF:


<CAPTION>activitePTF</CAPTION>

----

act_moi_moisPTF |
act_tac_codactPTF |
act_ing_codingPTF |
act_con_codconPTF |
act_nbjourpPTF |
act_nbjourfPTF |
act_prix_ventePTF |
act_prix_achatPTF |

----

01-2005,
14,
84,
7032,
17,5,
17,5,
700,
0,
----

01-2005,
14,
163,
60201,
18,
18,
448,
0,
----

01-2005,
14,
176,
2023,
9,
9,
0,
0,
----

01-2005,
14,
176,
40009,
0,5,
0,5,
0,
0,
----

01-2005,
14,
176,
70133,
2,
2,
0,
0,
<TFOOT></TFOOT>
même présentation pour la table activite

merci
0
zekabyle Messages postés 28 Date d'inscription lundi 6 mars 2006 Statut Membre Dernière intervention 2 janvier 2007
10 mai 2006 à 14:19
c'est la partie sur la mise à jour qui prend le plus de temps

merci
0
aieeeuuuuu Messages postés 698 Date d'inscription jeudi 16 janvier 2003 Statut Membre Dernière intervention 20 mai 2011 3
10 mai 2006 à 18:08
ok,

dans access tu as la possibilité d'ajouter une table liée.

en fait, c'est une sorte de lien vers une table d'une autre base de données. ensuite ca te permet d'acceder a cette table comme si elle etait dans la base de données sur laquelle tu travaille.

je ne sais pas ce que ca peut donner niveau temps d'execution, mais je pense que tu peux essayer de faire ca, puis de faire tes mises a jour avec une seule requete comme si tes deux tables etaient dans la meme base de données

essaie et dis nous ce que ca donne

bon courage
0
zekabyle Messages postés 28 Date d'inscription lundi 6 mars 2006 Statut Membre Dernière intervention 2 janvier 2007
10 mai 2006 à 20:14
ok je vais essayer
merci
0
zekabyle Messages postés 28 Date d'inscription lundi 6 mars 2006 Statut Membre Dernière intervention 2 janvier 2007
16 mai 2006 à 14:57
j'ai essayé et ça n'a pas marché comme je voulais, j'ai essayé autre chose et j'ai modifié le délai maxi d'exécution du script et ça a mieux marché.

Merci pour l'aide apportée
0
aieeeuuuuu Messages postés 698 Date d'inscription jeudi 16 janvier 2003 Statut Membre Dernière intervention 20 mai 2011 3
16 mai 2006 à 18:53
de rien,

tu peux peut etre mettre ici ce que tu as fait, et accepter ta réponse,

ca pourra surement aider quelqu'un d'autre à l'avenir

bonne continuation
0
zekabyle Messages postés 28 Date d'inscription lundi 6 mars 2006 Statut Membre Dernière intervention 2 janvier 2007
17 mai 2006 à 09:42
je garde dans un tableau les valeurs de ma table puis,
au lieu de comparer les valeurs de la table au tableau, j'ai comparé le tableau aux valeurs de la table puis j'ai testé d'abord si il y a fin de fichier puis je mets à jour avec update en mettant dans le WHERE là où je veux mettre à jour.Bien sûr j'ouvre les bases et je les ferme quand je n'en ai plus besoin(j'avais trois bases Access qui m'avaient été imposé à utiliser, la base que je dois mettre à jour contient les données des deux autres bases que j'utilise pour mettre à jour).
Server.ScriptTimeout pour changer le délai maximum d'un script.
0
Rejoignez-nous