Friday, 22 May 2015

Form - VB.net get next available value for column

To get the nex available value for a column - example:

 Public Overrides Sub Button_Click()  
   dim nummerfeld as Autodesk.Map.IM.Forms.DialogControls.TextBox  
   nummerfeld = Me.Dialog.Controls.Item("NUMMER")   
   dim maxNummer as Long = Me.Document.ConnectionTools.LngValue("select max(NUMMER)+1 from wse_br_wohnen")  
   nummerfeld.Value = maxNummer   
 End Sub  

No comments:

Post a Comment