Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

adox in vb6

I'm trying to update a database structure from another (updated) database.
When i'm creating the missing fields i can't determine the field properties. I can find what is the name of the missing field, i can determine its type, but for instance if the field is a 'Yes/No' field i'm not able to determine if in the field properties the value 'necessary' is true or false, or if it's index or not, and if it is, what type of index its using. Is there any way to do this (find and set the field properties)?
The code i'm using is this:

Private Sub iniciaTabela(ByVal strNomeTabela As String, ByRef myTable As ADOX.Table, _
ByVal tabelaDestino As ADOX.Table)
Dim intContador As Integer
Dim intIndex As Integer
Dim intInnerIndex As Integer
Dim intIndexColumn As Integer
Dim intInnerIndexColumn As Integer
Dim col As ADOX.Column
Dim bolFound As Boolean
Dim bolIndexFound As Boolean
Dim strErrInfo As String
Dim ADOXindex As New ADOX.Index
Dim intProperties As Integer


On Error GoTo ErrHandler

For Each tabelaDestino In Cat2.Tables
If myTable.Name = tabelaDestino.Name Then

For intContador = 0 To myTable.Columns.Count - 1
bolFound = False
For Each col In tabelaDestino.Columns
If col.Name = myTable.Columns.Item(intContador).Name Then
If col.Type <> myTable.Columns.Item(intContador).Type Then
strErrInfo = "Erro ao tentar actualizar o TIPO de campo na base dados " & m_bdDestino & " atrav
Sign In or Register to comment.