Groups | Blog | Home
all groups > sql server (alternate) > march 2004 >

sql server (alternate) : web page data type?


Rob Wahmann
3/13/2004 11:06:40 PM
I'm currently using the text data type with a length of 16. I was wondering
if there was a more efficient data type or length for storing web pages? I
chose this simply because there is essentially no limitation on the page
size, however, I am confident that no web pages will be 2Gb so I'm looking
for a better solution. This change is merely to save database space and to
be able to import/export data between databases (web pages are actually
written to static files that are included instead of pulling from the db)...
I'm currently receiving an error during these operations and I believe it's
because of the <long text> data that is contained within this field. Any
suggestions or help would be greatly appreciated!

TIA - Rob

oj
3/14/2004 5:45:00 AM
Text/ntext/image can't be declared with a fixed length. "16" is varbinary(16)
which is a pointer corresponds to the lob.

http://msdn.microsoft.com/library/en-us/acdata/ac_8_con_11_7zox.asp

--
-oj
http://www.rac4sql.net


[quoted text, click to view]

Erland Sommarskog
3/14/2004 1:39:30 PM
Rob Wahmann (rob@dotcomstudio.biz) writes:
[quoted text, click to view]

The alterantive would be to use varchar(8000), and then break up the text
in chunks to roll your own.

[quoted text, click to view]

Well, since you don't say which error you get, it's little difficult to
help you on that one.

--
Erland Sommarskog, SQL Server MVP, sommar@algonet.se

Books Online for SQL Server SP3 at
Rob Wahmann
3/14/2004 2:48:58 PM
[quoted text, click to view]

The error message says: Error at Destination for Row number 1. Errors
encountered so far in this task: 1. Query-based insertion or updating of
BLOB values is not supported.

This is plain text and I need to be able to import/export this. Still
searching myself but I appreciate any tips you can provide!

Rob

[quoted text, click to view]

Erland Sommarskog
3/14/2004 10:44:35 PM
Rob Wahmann (rob@dotcomstudio.biz) writes:
[quoted text, click to view]

Well, at least it tells you that text is not an option for the moment.

However, that is not a message from SQL Server, but from something else.
I don't think you told us which environment you are working in. How
does the code look like that yields this error?

In most environments, you need to use special interfaces to work with
text data.




--
Erland Sommarskog, SQL Server MVP, sommar@algonet.se

Books Online for SQL Server SP3 at
PromisedOyster NO[at]SPAM hotmail.com
3/15/2004 4:44:53 AM
[quoted text, click to view]

Rob,

Personally, I would not store web pages in a database in the first
place. What is the rationale for having them in a database? You can
have the url of the web page in the database (a common practice) if
you want to database drive functionality.

My suspicion is that there is binary data in your web page that is
being inserted/updated.

Rob Wahmann
3/15/2004 6:58:37 PM
[quoted text, click to view]

I agree. I am going to create a relational table to handle multiple
revisions of pages and then write the pages to files for including. Thanks
for the feedback!

Rob

Rob Wahmann
3/15/2004 7:00:19 PM
[quoted text, click to view]

This is SQL Server 2000 and it happens when I use the Import/Export Wizard.
Thanks!

Rob

[quoted text, click to view]

Erland Sommarskog
3/15/2004 10:51:32 PM
Rob Wahmann (rob@dotcomstudio.biz) writes:
[quoted text, click to view]

I have never used the Import/Export Wizard. I would suppose it has something
to with DTS, which again is something I have never used. But I would
expect DTS to be able to cope with text/image data, if not along the same
path as regular data.

I would suggest that you stroll over to the friendly people in
microsoft.public.sqlserver.dts and ask them. You can also check out the
FAQ on SQL Server MVP Darren Green's site http://www.sqldts.com.

--
Erland Sommarskog, SQL Server MVP, sommar@algonet.se

Books Online for SQL Server SP3 at
Rob Wahmann
3/16/2004 12:36:21 AM
Thanks for your assistance and direction!

Rob

[quoted text, click to view]

AddThis Social Bookmark Button