Scusa ma così inserisce l'IDTab1 in nuovi records; cioè mi registra tutti i dati in tab1 e tab2 e poi mi aggiunge due record a tab2 con i valori dell'IDtab1...
Questo è il codice che devo integrare:
codice:
arrPer = Split(strPERSONALE,", ")
for i = LBound(arrPer) to UBound(arrPer)
arr = Split(arrPer(i),"-")
sql = "INSERT INTO TAB2 (...) VALUES (...)"
next
stringa = strPERSONALE
arrStringa = split(stringa,", ")
for x = 0 to uBound(arrStringa)
if inStr(arrStringa(x),"-") > 0 then
tempArr = split(arrStringa(x),"-")
tempStringa = tempStringa & tempArr(1)
if x < uBound(arrStringa) then tempStringa = tempStringa & ", "
end if
Next
for i = 0 to datediff("d",cDate(strDUEDATE),cDate(strDUEDATE2)) step 1
strSql = "INSERT INTO TAB1 (...) values (...)"
cn.execute strSql
next