Olá Coders, preciso de ajuda.
Como fazer base de dados com mais 200 ou mais campos ou colunas ?.
As colunas devem conter imagens de alguns GB´s.
Quando tento fazer pego uma mensagem de erro "Formula too complex".
Alguem pode me ajudar ?
Meu codigo:
Sub make_DATABASE(dbGERpath$)
Dim f%, CAT As ADOX.Catalog, tOBJ As ADOX.Table
Set CAT = New ADOX.Catalog
CAT.Create "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbGERpath$ & ";Mode=Read|Write"
CAT.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbGERpath$ & ";Mode=Read|Write"
Set tOBJ = New ADOX.Table
tOBJ.name = "OBJ" 'DEFININDO A TABELA (OBJ):
Set tOBJ.ParentCatalog = CAT
For f% = 0 To totFIELDS! 'Max fields 90 no error <but i need 200 or more fields>
With tOBJ.Columns
.Append "REG" & f%, adVarWChar, 52 'Tipo Text
.Item(f%).Attributes = adColFixed + adPropRequired
End With
Next f
CAT.Tables.Append tOBJ
Set CAT = Nothing: Set tOBJ = Nothing
End Sub
Function open_DATABASE() As Boolean
dbCON.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbGERpath$ & ";Mode=Read|Write"
dbCON.CursorLocation = adUseClient
dbCON.Open
With cmdOBJ
.ActiveConnection = dbCON
.CommandText = "SELECT * FROM OBJ" 'txSQL$
.CommandType = adCmdText
End With
With tOBJ 'Cria a Tabela OBJ
.CursorType = adOpenStatic
.CursorLocation = adUseClient
.LockType = adLockOptimistic
.Open cmdOBJ
End With
Set SF.FLEX.DataSource = tOBJ
SF.FLEX.Redraw = True: SF.FLEX.Refresh
End Function