Hi.
I want to create an access table and ad some fileds.
i use this:
the problem is that when i get to the "fld = dbs.CreateTableDef.CreateField("IPNAME", long1, FldLen)"
line i get an error
" An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in WindowsApplication1.exe
Additional information: System resource exceeded."
Any ideas? Any other way to create a table?
I'm using .net 2003 for this one.
Thanks.
I want to create an access table and ad some fileds.
i use this:
VB.NET:
[SIZE=2]
[/SIZE][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] dbs [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DAO.Database, dbsContacts [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DAO.Database
[/SIZE][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] tdf [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]Object[/COLOR][/SIZE][SIZE=2], fld [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]Object
[/COLOR][/SIZE][SIZE=2]dbs = accessapplication.CurrentDb
[SIZE=2]tdf = dbs.CreateTableDef("IPDataTable")
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] long1 [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]Long[/COLOR][/SIZE][SIZE=2] = 10
fld = dbs.CreateTableDef.CreateField("IPNAME", long1, FldLen)
[SIZE=2]tdf.Fields.Append(fld)
dbs.TableDefs.Append(tdf)
[/SIZE][/SIZE][/SIZE][/SIZE]
line i get an error
" An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in WindowsApplication1.exe
Additional information: System resource exceeded."
Any ideas? Any other way to create a table?
I'm using .net 2003 for this one.
Thanks.