Jump to content

[Resolvido] Actualização de datagridview

Recommended Posts


jpaulino vi o teu tuto no vbtuga para fazer updates de datagrids e estava a tentar testar isso mas não estou a consegui tudo funciona perfeitamente o ds ta preenchido e a grelha tb mas kdo faxo o update:

       Dim cb As New SqlCommandBuilder(da)

                da.Update(ds, "minhatabela")

apareceme este erro:

Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information.

já dei voltas e voltas e não consigo perceber o k se passa!  😡


Share this post

Link to post
Share on other sites


Podem ser duas coisas:

1 - Não tens o campo da chave primária na DataGridView (por exemplo o ID)

2 - Não tens definida nenhuma chave primária na tabela.

Share this post

Link to post
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.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.