Hi @Mansour_Dalir ,
For details about the meaning of Column_Flags values, see DBSCHEMA_COLUMNS.
Using connection As New SqlConnection(connectionString)
connection.Open()
Dim tableSchema As DataTable = connection.GetSchema("Columns", New String() {Nothing, Nothing, tableName})
For Each row As DataRow In tableSchema.Rows
Dim columnName As String = row("COLUMN_NAME").ToString()
Dim columnFlags As Integer = Convert.ToInt32(row("COLUMN_FLAGS"))
Console.WriteLine($"Column Name: {columnName}, Column Flags: {columnFlags}")
Next
End Using
Best Regards.
Jiachen Li
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.