主题:用VFP命令,建立SQL中的表结构时的问题
public cconnstring
cconnstring="Driver=SQL Server;Server=&MY-TOMATO;UID=&sa;PWD=&sa;Database=&student;Trusted_Connection=No" &&服务器为“MY-TOMATO”,用户名为“sa”,密码为“sa”,数据库为“student”
nConnHandle=sqlstringconnect(cconnstring) &&建立连接句柄
if nConnHandle<0
messagebox("连接失败!",64,"提示")
RETURN .F.
endif
*!*table admin
=SQLEXEC(nConnHandle,"CREATE TABLE admin([ID] [int] PRIMARY KEY NOT NULL,******)")
=SQLEXEC(nConnHandle,csql)
=SQLEXEC(nConnHandle,"sp_help class")
sqldisconnect(nConnHandle) &&关闭连接句柄
messagebox("导入成功!",64,"提示")
thisform.Release
[color=FF0000]以上代码可以建立SQL中的表结构,请教高手们:在"([ID] [int] PRIMARY KEY NOT NULL"句中,如何把[id]建成"识标"设为"是","识标种子"为"1",识标增量为"1"?[/color]
cconnstring="Driver=SQL Server;Server=&MY-TOMATO;UID=&sa;PWD=&sa;Database=&student;Trusted_Connection=No" &&服务器为“MY-TOMATO”,用户名为“sa”,密码为“sa”,数据库为“student”
nConnHandle=sqlstringconnect(cconnstring) &&建立连接句柄
if nConnHandle<0
messagebox("连接失败!",64,"提示")
RETURN .F.
endif
*!*table admin
=SQLEXEC(nConnHandle,"CREATE TABLE admin([ID] [int] PRIMARY KEY NOT NULL,******)")
=SQLEXEC(nConnHandle,csql)
=SQLEXEC(nConnHandle,"sp_help class")
sqldisconnect(nConnHandle) &&关闭连接句柄
messagebox("导入成功!",64,"提示")
thisform.Release
[color=FF0000]以上代码可以建立SQL中的表结构,请教高手们:在"([ID] [int] PRIMARY KEY NOT NULL"句中,如何把[id]建成"识标"设为"是","识标种子"为"1",识标增量为"1"?[/color]