Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Access create table
Message
From
30/10/2008 13:41:24
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
30/10/2008 13:03:56
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01358402
Message ID:
01358423
Views:
18
>Can somebody help me with the proper syntax for the field commands in this sequence? (and the values for dbText and dbMemo)
>Thanks
>
>oAccess = createobject("Access.application")
>oAccess.visible= .t.
>
>newMDB = oAccess.NewCurrentDatabase("C:\accesstest")
>tdfnew = oAccess.CurrentDb.CreateTableDef('testtable')
>	
>with tdfnew
>.fields.append .CreateField("FirstName", "dbText")
>.fields.append .CreateField("LastName", "dbText")
>.fields.append .CreateField("Phone", "dbText")
>.fields.append .CreateField("Notes", "dbMemo")
>newMDB.TableDefs.append tdfnew
>endwith
>
I happen to know 10 from documentation. Documentation is so weak that I don't know what would it be if boolean, date ...
oAccess = createobject("Access.application")
oAccess.visible= .t.

oAccess.NewCurrentDatabase("C:\accesstest.mdb")
newMDB = oAccess.CurrentDb
tdfnew = oAccess.CurrentDb.CreateTableDef('testtable')
	
with tdfnew
.fields.append( .CreateField("FirstName", 10) )
.fields.append( .CreateField("LastName", 10) )
.fields.append( .CreateField("Phone", 10) )
.fields.append( .CreateField("Notes", 10) )
ENDWITH
newMDB.TableDefs.append( tdfnew )
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform