per leggere un file, linea per linea del tipo
nome||cognome||anni||etc
ho fatto così:
codice:
<%
strSQL = ""
set fs = Server.CreateObject("Scripting.FileSystemObject")
set f = fs.OpenTextFile(Server.MapPath("text.txt"),1,0)
do while f.AtEndOfStream = false
r = f.ReadLine
arrR = Split(r,"||")
SQL = "Insert into tabella (nome,cognome,anni,etc) values (" & _
"'" & arrR(0) & "'," & _
"'" & arrR(1) & "'," & _
"'" & arrR(2) & "'," & _
"'" & arrR(3) & "') "
strSQL = strSQL & vbcrlf & SQL
loop
response.write strSQL 'qui faccio conn.Execute(strSQL)
%>
Ma in quello caso, stavo leggendo linea per linea…