This statement creates a new table.
CREATE TABLE tablename (fieldname fieldtype [,fieldname fieldtype])
The SQL data types uint and usmallint are provided solely for backward compatibility with existing Windows CE-based tables. However, this compatibility does not apply to the conversion and filter tools and should not be generally relied upon. You should not use the uint or usmallint datatypes. Instead, use the signed equivalents of int and smallint.
One of the following error values can be returned:
In Windows CE, you cannot have two tables with the same name on the same device.
Types uint and usmallint are not standard data types on other database systems. It is recommended that users should not use these data types; they are included here for completeness, but may not be supported on future versions of ADOCE or Windows CE.
Dim rs, i, sql(12), sqlcmd
Set rs = CreateObject("adoce.recordset")
sql(0) = "create table allfields ("
sql(1) = "f1 varchar ," 'adVarWChar
sql(2) = "f2 varchar(30)," 'adVarWChar
sql(3) = "f3 text ," 'adLongVarWChar
sql(4) = "f4 varbinary ," 'adVarBinary
sql(5) = "f5 varbinary (30) ," 'adVarBinary
sql(6) = "f6 long varbinary ," 'adLongVarBinary
sql(7) = "f7 int ," 'adInteger
sql(8) = "f8 smallint ," 'adSmallInt
sql(9) = "f9 float ," 'adDouble
sql(10) = "f10 datetime ," 'adDate
sql(11) = "f11 bit" 'adBoolean
sql(12) = ")"
For i = 0 To 12
sqlcmd = sqlcmd & sql(i)
Next
rs.open sqlcmd
rs.open "allfields"
MsgBox rs.fields.Count, , "Fields"
rs.Close
rs.open "drop table allfields"
Set rs = Nothing