Bonjour a tous,
J'ai un petit bug lors de la creation de mon fichier via 1dts.
Celui-ci est cesse recuperer les champs d'une table sql et d'inscrire dans un bete fichier texte les resulats.
Mon bug est le suivant, a un moment donne, il y a une ligne qui saute dans le fichier texte alors que les champs de ma table sql sont correctment remplis.
voici un petit bout de code:
Function GetStringByPosition(byval lInputString,byval lStringLengt, byref lOutputString)
lCurrentString = lInputString
if lCurrentString <> "" then
lCurrentLength = len (lInputString)
else
lCurrentLength = 0
end if
if lCurrentLength < lStringLengt then
for i = lCurrentLength+1 to lStringLengt
lCurrentString = lCurrentString & " "
next
end if
lOutputString = lCurrentString
End Function
sHead2SQL = "select first_tab,waybill,delivery_date,order_number,order_date " & _
" from maTable " & _
" where file_id=1
call openRS(sHead2SQL,rsHead2)
call GetStringByPosition( rsHead2("first_tab"),8, lHead2_1)
call GetStringByPosition( rsHead2("waybill"),15, lHead2_2)
call GetStringByPosition( rsHead2("delivery_date"),12, lHead2_3)
call GetStringByPosition( rsHead2("order_number"),15, lHead2_4)
call GetStringByPosition( rsHead2("order_date"),8, lHead2_5)
sLine = lHead2_1 & _
lHead2_2 & _
lHead2_3 & _
lHead2_4 & _
lHead2_5
objStream.WriteLine(sLine)
rsHead2.close
Si quelqu'un a une idee, elle sera la bienvenue.
Merci
talia