CTOAS Posted July 20, 2012 Report Share Posted July 20, 2012 Bom dia amigos. Como incluir registros na tabela ? Estou fazendo assim: BEGIN TRANSACTION FOR I := 1 TO LEN(aARRAY) SQLEXECUTE('INSERT INTO `_RESET` values (&aARRAY[i,1], &aARRAY[i,2], &aARRAY[i,3], &aARRAY[i,4], &aARRAY[i,5], &aARRAY[i,6], &aARRAY[i,7], &aARRAY[i,8], &aARRAY[i,9])') NEXT END TRANSACTION id=code>id=code>Mas não inclui nada... []'s Quote Link to comment Share on other sites More sharing options...
CTOAS Posted July 20, 2012 Author Report Share Posted July 20, 2012 Bom dia amigos. Como incluir registros na tabela ? Estou fazendo assim: BEGIN TRANSACTION FOR I := 1 TO LEN(aARRAY) SQLEXECUTE('INSERT INTO `_RESET` values (&aARRAY[i,1], &aARRAY[i,2], &aARRAY[i,3], &aARRAY[i,4], &aARRAY[i,5], &aARRAY[i,6], &aARRAY[i,7], &aARRAY[i,8], &aARRAY[i,9])') NEXT END TRANSACTION id=code>id=code>Mas não inclui nada... []'s Quote Link to comment Share on other sites More sharing options...
FiveWinBr Posted July 20, 2012 Report Share Posted July 20, 2012 cSQL := "INSERT INTO '_RESET' VALUES ('"+aArray[i,1]+"','"+aArray[i,2]+"','"+aArray[i,3]+"','"+aArray[i,4]+"','"+aArray[i,5]+"','"+aArray[i,6]+"','"+aArray[i,7]+"','"+aArray[i,8]+"','"+aArray[i,9]+"')" Next i SQLExecute( cSQL )id=code>id=code>Lembrando que para utilizar direto o VALUES a sua estrutura tem que ser nessa mesma sequencia, caso contrario seria algo como: id=code>id=code> Att. Lailton Fernando Mariano http://www.lailton.com.br | Mail/Msn: xHarbour 1.2.1 | Harbour 3.2.0 | Fivewin 12.4 | HwGui | Borland 5.8.2 | FiveWeb | MySQL Quote Link to comment Share on other sites More sharing options...
CTOAS Posted July 20, 2012 Author Report Share Posted July 20, 2012 Valeu Lailton. Obrigado Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.