all groups > sql server (alternate) > march 2004 >
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
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] "Rob Wahmann" <rob@dotcomstudio.biz> wrote in message news:4uM4c.33989$PY.22908@newssvr26.news.prodigy.com... > 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 > >
Rob Wahmann (rob@dotcomstudio.biz) writes: [quoted text, click to view] > 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)...
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] > 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!
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
[quoted text, click to view] "Erland Sommarskog" <sommar@algonet.se> wrote in message news:Xns94AC94DB78A67Yazorman@127.0.0.1... > Rob Wahmann (rob@dotcomstudio.biz) writes: > > 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)... > > The alterantive would be to use varchar(8000), and then break up the text > in chunks to roll your own. > > > 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! > > Well, since you don't say which error you get, it's little difficult to > help you on that one.
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, SQL Server MVP, sommar@algonet.se > > Books Online for SQL Server SP3 at > http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
Rob Wahmann (rob@dotcomstudio.biz) writes: [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.
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
[quoted text, click to view] "Rob Wahmann" <rob@dotcomstudio.biz> wrote in message news:<4uM4c.33989$PY.22908@newssvr26.news.prodigy.com>... > 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
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.
[quoted text, click to view] "Mystery Man" <PromisedOyster@hotmail.com> wrote in message news:87c81238.0403150444.18baa4d2@posting.google.com... > "Rob Wahmann" <rob@dotcomstudio.biz> wrote in message news:<4uM4c.33989$PY.22908@newssvr26.news.prodigy.com>... > > 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 > > 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. > > My advice is to get the web-pages out of the database.
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
[quoted text, click to view] "Erland Sommarskog" <sommar@algonet.se> wrote in message news:Xns94ACF143532D4Yazorman@127.0.0.1... > Rob Wahmann (rob@dotcomstudio.biz) writes: > > 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. > > 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?
This is SQL Server 2000 and it happens when I use the Import/Export Wizard. Thanks! Rob [quoted text, click to view] > 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 > http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
Rob Wahmann (rob@dotcomstudio.biz) writes: [quoted text, click to view] > This is SQL Server 2000 and it happens when I use the Import/Export > Wizard.
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
Thanks for your assistance and direction! Rob [quoted text, click to view] "Erland Sommarskog" <sommar@algonet.se> wrote in message news:Xns94ADF2706F6CCYazorman@127.0.0.1... > Rob Wahmann (rob@dotcomstudio.biz) writes: > > This is SQL Server 2000 and it happens when I use the Import/Export > > Wizard. > > 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 > http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
Don't see what you're looking for? Try a search.
|
|
|