你好,
这边有一个在access中创建表的代码,你可以参考一下:http://1drv.ms/1LJV1JR
你需要把这段代码修改成对应你的表结构即可。
Shared Function CommandString(sType As DatabaseType) As ArrayList
Dim result As New ArrayList
Select Case sType
Case DatabaseType.sample1
result.Add("CREATE TABLE sample1 ([id] COUNTER IDENTITY(1,1), [SessionId] VARCHAR (40), [SessionDate] DATETIME, [SessionName] LONGTEXT, CONSTRAINT PKSessions PRIMARY KEY (SessionId))")
Case DatabaseType.sample2
result.Add("CREATE TABLE Roles ([id] COUNTER IDENTITY(1,1), [Rolename] LONGTEXT, [ApplicationName] LONGTEXT, CONSTRAINT PKRoles PRIMARY KEY (Rolename, ApplicationName))")
result.Add("CREATE TABLE UsersInRoles ([id] COUNTER IDENTITY(1,1), [Username] LONGTEXT, [Rolename] LONGTEXT, [ApplicationName] LONGTEXT, CONSTRAINT PKUsersInRoles PRIMARY KEY (Username, Rolename, ApplicationName))")
End Select
Return result
End Function
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.