更新SQL Server 2000中的文本字段 [英] Updating a text field in SQL Server 2000

查看:89
本文介绍了更新SQL Server 2000中的文本字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试编写一些代码来插入或更新我的

SQL Server 2000数据库中的文本字段。 SQL语句是使用来自

a表单的提交创建的,文本来自< textarea>,因此通过请求将

放入SQL语句中(&]栏位")。但是,由于SQL Server 2000和文本字段中的限制

,我不能使用文本超过8000字节的简单更新或插入

命令。


是否有人有任何示例语句可以帮助我更新该字段

数据量更大?我尝试过使用WRITETEXT函数和

UPDATETEXT函数,但很少或没有成功。帮助!!

解决方案

我在网上找到的东西(谢谢,谷歌!)

http://www.pstruh.cz/help/scptutl/sa259.htm


您基本上将文本转换为十六进制等效值,并使用

Updatetext函数。


-

Manohar Kamath

编辑,.netBooks
www.dotnetbooks.com

" Michael Walton" < MW ***** @ thomasassociates.cc>在消息中写道

news:uF ************** @ TK2MSFTNGP11.phx.gbl ...

我正在写一些代码,用于在我的SQL Server 2000数据库中插入或更新文本字段。使用表单中的submit
创建SQL语句,并且文本来自< textarea>,因此通过Request(field)将
放入SQL语句中。但是,由于SQL Server 2000和文本字段中的
限制,我无法使用文本超过8000字节的简单更新或
插入命令。

是否有人有任何样本这些语句可以帮助我用更大量的数据更新
字段?我试过使用WRITETEXT函数
和UPDATETEXT函数很少或没有成功。帮助!!



感谢您的链接。我之前见过一些想法。

问题是他们正在将一个大文件上传到一个文本字段(

实际上可能会更好在图像领域中关闭)。但是,我正在做什么

是在表单中输入大量文本,并将表单提交给一个ASP页面

。然后,ASP页面创建一个SQL语句,并尝试将参数存储到文本字段中。我尝试了Updatetext和Writetext,并且

收效甚微。它似乎是第一次工作,但我不能得到它后来更新的东西。 :-(我被卡住了。

Manohar Kamath [MVP]< mk ***** @ TAKETHISOUTkamath.com>写在留言中

新闻: %2 *************** @ TK2MSFTNGP11.phx.gbl ...

我在网上找到的东西(谢谢,谷歌!)

http://www.pstruh.cz/help/ scptutl / sa259.htm

您基本上将文本转换为十六进制等效值,并使用
Updatetext函数。

-
Manohar Kamath
编辑,.netBooks
www.dotnetbooks.com

迈克尔·沃尔顿< mw ***** @ thomasassociates.cc>在消息中写道
新闻:uF *********** *** @ TK2MSFTNGP11.phx.gbl ...

我正在尝试编写一些代码,用于在
我的SQL Server 2000数据库中插入或更新文本字段。创建SQL语句使用提交
来自

一个表单,文本来自< textarea>,因此


放置

通过请求(字段)进入SQL语句。但是,由于SQL Server 2000和文本字段中的


限制

,我无法使用简单的更新或


Insert

命令,文本超过8000个字节。

是否有人有任何示例语句可以帮助我更新


字段

更大数据量?我尝试过使用WRITETEXT函数


UPDATETEXT函数,但很少或没有成功。帮助!!




然而,我正在做的事情

正在进入将大量文本放入表单,并将表单提交到ASP页面。 ASP页面然后创建一个SQL语句并尝试将参数存储到文本字段中。




也许你可以展示你正在尝试的东西,我们可以建议

替代。


例如,你不能说UPDATE table SET textColumn = textColumn +

''foo''"


但是,一次更改整个值应该没问题

方式。


I am trying to write some code that inserts or updates a text field in my
SQL Server 2000 database. The SQL statement is created using a submit from
a form, and the text is coming from a <textarea>, and therefore being placed
into the SQL statement via a Request("field"). However, due to limitations
in SQL Server 2000 and text fields, I can not use a simple Update or Insert
command with text over 8000 bytes.

Does anybody have any sample statements that will help me update that field
with larger amounts of data? I have tried using the WRITETEXT function and
UPDATETEXT function with little or no success. Help!!

解决方案

Something I found on the net (thanks, google!)

http://www.pstruh.cz/help/scptutl/sa259.htm

You basically convert your text into it''s hex equivalent, and use the
Updatetext function.

--
Manohar Kamath
Editor, .netBooks
www.dotnetbooks.com
"Michael Walton" <mw*****@thomasassociates.cc> wrote in message
news:uF**************@TK2MSFTNGP11.phx.gbl...

I am trying to write some code that inserts or updates a text field in my
SQL Server 2000 database. The SQL statement is created using a submit from a form, and the text is coming from a <textarea>, and therefore being placed into the SQL statement via a Request("field"). However, due to limitations in SQL Server 2000 and text fields, I can not use a simple Update or Insert command with text over 8000 bytes.

Does anybody have any sample statements that will help me update that field with larger amounts of data? I have tried using the WRITETEXT function and UPDATETEXT function with little or no success. Help!!



Thanks for that link. There are some ideas in there that I''ve seen before.
The problem is that they are uploading a large file into a text field (which
actually might be better off in an image field). However, what I am doing
is entering a large amount of text into a form, and submitting the form to
an ASP page. The ASP page then creates a SQL Statement and tries to store
the parameter into a text field. I have tried Updatetext and Writetext with
little success. It appears that it works the first time, but I can''t get it
to update something later. :-( I am stuck.
"Manohar Kamath [MVP]" <mk*****@TAKETHISOUTkamath.com> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...

Something I found on the net (thanks, google!)

http://www.pstruh.cz/help/scptutl/sa259.htm

You basically convert your text into it''s hex equivalent, and use the
Updatetext function.

--
Manohar Kamath
Editor, .netBooks
www.dotnetbooks.com
"Michael Walton" <mw*****@thomasassociates.cc> wrote in message
news:uF**************@TK2MSFTNGP11.phx.gbl...

I am trying to write some code that inserts or updates a text field in my SQL Server 2000 database. The SQL statement is created using a submit


from

a form, and the text is coming from a <textarea>, and therefore being


placed

into the SQL statement via a Request("field"). However, due to


limitations

in SQL Server 2000 and text fields, I can not use a simple Update or


Insert

command with text over 8000 bytes.

Does anybody have any sample statements that will help me update that


field

with larger amounts of data? I have tried using the WRITETEXT function


and

UPDATETEXT function with little or no success. Help!!




However, what I am doing

is entering a large amount of text into a form, and submitting the form to
an ASP page. The ASP page then creates a SQL Statement and tries to store
the parameter into a text field.



Maybe you could show what you are trying and we could suggest an
alternative.

For example, you can''t say "UPDATE table SET textColumn = textColumn +
''foo''"

However, it should be no problem to change the entire value at one time that
way.


这篇关于更新SQL Server 2000中的文本字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆