表如下: create table test ( id int primary key not null IDENTITY, content ntext, title nvarchar(100), typeid int )插入语句为:SQL="insert into test(content,title,typeid) VALUES('"&content&"','"&title&"',"&typeid&")"Conn.execute(SQL) 谢谢
因为查询无法同时更新聚集键和 text、ntext 或 image 列。 create table test ( id int primary key not null IDENTITY,--这是聚集键 content ntext, --这是ntext列 title nvarchar(100), typeid int )所以分两次更新就可以了。
你把“content ntext”放到最后一列估计就好了 create table test ( id int primary key not null IDENTITY,--这是聚集键 typeid int, title nvarchar(100), content ntext --这是ntext列)SQL="insert into test(typeid, title, content) VALUES("&typeid&", '"&title&"', '"&content&"')"
create table test
(
id int primary key not null IDENTITY,
content ntext,
title nvarchar(100),
typeid int
)插入语句为:SQL="insert into test(content,title,typeid) VALUES('"&content&"','"&title&"',"&typeid&")"Conn.execute(SQL)
谢谢
你先插入title 和stypeid 然后再 update 把 content 更新
就是说分成两步
text、image的使用还是很不方便
(
id int primary key not null IDENTITY,--这是聚集键
content ntext, --这是ntext列
title nvarchar(100),
typeid int
)所以分两次更新就可以了。
create table test
(
id int primary key not null IDENTITY,--这是聚集键
typeid int,
title nvarchar(100),
content ntext --这是ntext列)SQL="insert into test(typeid, title, content) VALUES("&typeid&", '"&title&"', '"&content&"')"