Ciao, con la ricerca ho trovato questo codice che vorrei far funzionare per l'inserimento tramite query dei dati in un db sql server.
il problema è che continua a restituire questo errore:codice:dati = split(valoreform,",") for i = 0 to Ubound(dati) sql = "insert into tabella (campouno, campodue, campotre, campoquattro) VALUES (" dati1 = split(dati(i),"-") for j = 0 to Ubound(dati1) if j = 0 then sql = sql & trim(dati1(j)) else sql = sql & ",'" & Replace(trim(dati1(j)),"'","''") & "'" end if next sql = sql & ",'"&campouno1&"', "&campouno0&",'"&campotre1&"',"&campoquattro0&")" cn.execute sql nextMa il numero dei campi sembra essere uguale, a meno che non succede qualcosa nel ciclo...Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]There are fewer columns in the INSERT statement than values specified in the
VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement.
/pagina.asp, line 378
Sapete aiutarmi? Grazie

Rispondi quotando
