关于数据表字段类型的问题(50分)

  • 主题发起人 主题发起人 w009
  • 开始时间 开始时间
W

w009

Unregistered / Unconfirmed
GUEST, unregistred user!
请教各位:
用程序创建一个Access数据库后,想创建一个表,如何创建“OLE对象”和“自动编号”类型的字段?SQL语句怎么写?
 
自动编号每个表只能有一个啊
用sql创建俺不会,
 
给你贴个ACCESS的例子:
procedure CheckTable_CustomIllness; //'CustomIllness';用户自建疾病表
var
CreateStr : string;
begin
if not TableExists(DM.Con_JiuQ,IllnessTable) then
begin
CreateStr := 'Create Table ' + IllnessTable +
' ( [IllID] counter, ' + //病名ID,自动编号的字段
' [Illness] varchar(100), ' + //病名
' [IllKind] Integer,' + //病名的性质
' [IllDetail] Text,' + //疾病阐述
' [IllQueryWord] Text,' + //症状查询字
' [CNRecipe] Text, ' + //中药方
' [WesternRecipe] Text,' + //西药方
' [IntegratedRecipe] Text,' + //综合方
' [OtherRecipe] Text,' + //针炙理疗处方
' [RecipeUse] Text' + //中药方用法
' [CNProductRecipe] Text' + //中成药方
' [OtherUsage] Text' + //针炙理疗治法
' ) ';
Do_ADOSQL(DM.Con_JiuQ,CreateStr);
CreateStr := 'Alter Table ' + IllnessTable + ' Add Primary Key (IllID)';
Do_ADOSQL(dm.Con_JiuQ,CreateStr);
end;
end;
 
OLE 对象 的类型应该是: OLEObject
 
Create Table fujian([自动编号] COUNTER,[OLE对象] IMAGE)
 
谢谢各位
 
后退
顶部