Quantcast
Channel: Tópicos
Viewing all articles
Browse latest Browse all 11336

Obter o último id inserido

$
0
0
Boa tarde vikcch, obrigado pelo link, isso do identity ja sei. mas como é um projecto grande e tenho que ter os datasets typed, e fazer o insert de forma automatica. vou dar o exemplo Dim imovel As DataRow imovel = DBDataSet.Tables("TBLIMO").NewRow imovel.Item("Localizacao") = LocalizacaoTextBox.Text imovel.Item("Tipologia") = ComboBox1.SelectedValue imovel.Item("IMG") = nomeimg DBDataSet.Tables("TBLIMO").Rows.Add(imovel) TableAdapterManager.UpdateAll(DBDataSet) Como pode verificar estou a fazer o insert de forma automática. apartir desta situaçao como consigo ir buscar o ultimo id. Se for de forma manual sqlcomand sei o fazer, mas o insert é tao grande tao grande nem me atrevo o fazer.

Viewing all articles
Browse latest Browse all 11336

Trending Articles