
21/02/2006, 10:05
|
| | Fecha de Ingreso: noviembre-2004
Mensajes: 371
Antigüedad: 20 años, 6 meses Puntos: 0 | |
Problema para insertar en tabla dinamica Hola a todos, tengo el siguiente proble, creo una tabla dinamicamente, (me crea la tabla con sus campos) el proble esta al hacer el insert en esta tabla, me manda el sig error:
El subindice esta fuera del intervalo 'w'.
w es mi variable para recorrer un arreglo que tiene ese nombre (arreglo), el cod es el sig:
If not textStreamObject.AtEndOfStream Then
while not textStreamObject.AtendOfStream
linea = textStreamObject.ReadLine
arreglo = split(linea, chr(13))
for i=0 to ubound(arreglo)
dato = split(arreglo(i), chr(radiobutton))
next
for i=0 to ubound(dato)
sql = "INSERT INTO "&grupo&" ("
for j = 0 to x
sql = sql + " " & objUpload.form("campo("&j&")") & " "
next
sql = mid(sql,1,len(sql)-1)
sql = sql + " ) VALUES ("
for w = 0 to x
sql = sql + " '"& dato(w) & "',"
next
sql = mid(sql,1,len(sql)-1)
sql = sql + ")"
conexion.EXECUTE sql
next
wend
end if
chr(radiobutton) puede ser el chr de una tabulacion, una coma, punto y como, etc.
desde ya se agradece cualkier tipo de ayuda. |