Yes - but:
You should use either ADO Stream objects or GetChunk/AppendChunk when
working with TEXT data. There are some limitations to what you can do with
it (sorting, comparing, etc.) and how you should deal with it in ADO (last
column(s) in query, no caching - so only read each field once, etc.).
Check the following MSDN articles (BLOB's and Text columns share most
characteristics and problems):
HOWTO: Access and Modify SQL Server BLOB Data by Using the ADO Stream Object
ID: Q258038
NOTE: Use type adTypeText instead of adTypeBinary, and otherwise
modify as required.
PRB: Invalid Use of NULL Assigning Text Fields Value
ID: Q198300
PRB: 80020009 Error When Retrieving Data from SQL
ID: Q175239
(From SQL Server BOL): "Managing Long Data Types"
Also, for BLOB's you need to add 1 to the length/size parameter. I'm not
quite sure if this applies to Text as well.
SQL Server also provides several functions/capabilities for working with
TEXT columns, but you don't necessarily have to use them. If you deal with
TEXT columns in a stored procedure, you may need to set the TEXTSIZE to
ensure you don't need to access the text column using text pointers, etc.
HTH,
Tore.
-----Original Message-----
From: Imad Jradi [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 04, 2002 11:43 AM
To: ActiveServerPages
Subject: RE: design issue
Thanks for the reply,
When I construct my column with a type Text, the length is set to 16.
So if I am calling a sp from my vb code to insert a large text file, I would
abviously user the adTypeText keyword, but do I specify a length?
Thanks,
>From: "Bostrup, Tore" <[EMAIL PROTECTED]>
>Reply-To: "ActiveServerPages" <[EMAIL PROTECTED]>
>To: "ActiveServerPages" <[EMAIL PROTECTED]>
>Subject: RE: design issue
>Date: Wed, 4 Sep 2002 09:23:34 -0400
>
>SQL Server: A Varchar column can hold up to 8000 characters, but a Text
>column allows up to 2 Gb. Articles would typically be stored as Text data
>type (if in the database). When dealing with Text (and/or ntext (unicode)
>and BLOB's) data type, there are some rules to observe. An MSDN search for
>'BLOB and ADO' would go a long way towards providing the recommended
>reading.
>
>HTH,
>Tore.
>
>-----Original Message-----
>From: Remie Bolte [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, September 04, 2002 9:24 AM
>To: ActiveServerPages
>Subject: Re: design issue
>
>
>I heard someone talking about maximum number of characters in SQL
>databases.
>is it true that a dbase has a character maximum or is there a type that
>holds unlimited text
>
>regards
>
>Remie Bolte
>
>----- Original Message -----
>From: "Bostrup, Tore" <[EMAIL PROTECTED]>
>To: "ActiveServerPages" <[EMAIL PROTECTED]>
>Sent: Wednesday, September 04, 2002 3:11 PM
>Subject: RE: design issue
>
>
> > Both would be valid, reasonable options. Some people prefer to store
>the
> > path to a file in the database. This would allow manipulating the files
> > with any available tools, etc., but it also opens up for failure
>situations
> > (files moved, deleted, etc.). If you need strict control of the
>articles,
> > then store them in the database (your app can control what is done to
>them),
> > otherwise. Choose the approach that best fits your needs.
> >
> > HTH,
> > Tore.
> >
> > -----Original Message-----
> > From: Imad Jradi [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, September 04, 2002 8:58 AM
> > To: ActiveServerPages
> > Subject: design issue
> >
> >
> > I have articles that a user writes through a form in an asp and then
>submits
> >
> > it to the server. What would be the best solution/performance on storing
> > these articles. Do I store them in sql server as text or store them on
>the
> > hard disk as xml files with references in the database?
> > If anyone can help me with that, I would realy appreciate it.
> > Thanks
> > Imad
> >
> >
> >
> > _________________________________________________________________
> > Join the world's largest e-mail service with MSN Hotmail.
> > http://www.hotmail.com
> >
> >
> > ---
> > You are currently subscribed to activeserverpages as:
>[EMAIL PROTECTED]
> > To unsubscribe send a blank email to
> > %%email.unsub%%
> >
> > ---
> > You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
> > To unsubscribe send a blank email to
>%%email.unsub%%
> >
>
>
>
>---
>You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
>To unsubscribe send a blank email to
>%%email.unsub%%
>
>---
>You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
>To unsubscribe send a blank email to
>%%email.unsub%%
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx
---
You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%
---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]