|
-
Aug 19th, 2012, 08:40 AM
#1
Thread Starter
New Member
How do database of more 200 or more fields or columns?
Hello crazy people, 
I´m brazilian coder, use VB6 and i need help, please.
How do database of more 200 or more fields or columns?
The columns must contain images of some GB's
When I try to pick up an error message "Formula too complex".
Can someone help me?
here is my code:
'--------------------------------------------
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
'--------------------------------------------
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|