1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| str = "Blocs FB"
Dim cKeyInit As String = "Init"
Dim cRubrique As String = str '"Blocs FB""VisualBasic"
cRubrique = Mid(str, 7)
Dim cKeyDefaut As String = "Defaut"
Dim cKey As String = "1" 'Nom de la clé
Dim cRepertoire As String = Space(255) 'Variable récupérant la string
Dim cIniFile As String = "C:\Documents and Settings\stagiaire1\Bureau\format.ini" 'Nom du fichier Ini
Dim istat As Integer
Dim SQLinsert, SQLadd, adr As String
'Appel de la fonction
istat = Get_Private_Profile_String(cRubrique, cKeyInit, "", cRepertoire, cIniFile)
If cRepertoire = "Auto" Then
istat = Get_Private_Profile_String(cRubrique, cKeyDefaut, "", cRepertoire, cIniFile)
cKey = Trim(cRepertoire)
istat = Get_Private_Profile_String(cRubrique, cKey, "", cRepertoire, cIniFile)
cRepertoire = cRepertoire.Replace("n", "")
Dim i, j, pe, taille As Integer
'allé voir ds fichier ini si auto si manu
For i = 0 To Val(TextBox2.Text) - 1
pe = Val(TextBox1.Text) + i
taille = CType(pe, String).Length
adr = CType(pe, String)
For j = Val(taille) To 2
adr = "0" & adr
Next
SQLinsert = "INSERT INTO Liste_FB (FB_adr,FB_ID_format)" & _
"VALUES ('" & adr & "','" & cRepertoire & adr & "')"
cmd.CommandText = SQLinsert
cmd.Connection = cn
cmd.ExecuteNonQuery()
Next |
Partager