Jump to content
Fivewin Brasil

SQLLIB Inclusão de dados


CTOAS

Recommended Posts

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

logoforum.jpg

Link to comment
Share on other sites

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

logoforum.jpg

Link to comment
Share on other sites


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>

icon_smile.gif

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...