Blob Text Or Varchar?
Jan 10, 2002
hi everyone a question for all you wise men out there! ;-)
i run a db with thousands of reviews, interviews, article and so on. What's better: 1) leaving all the articles on .txt files and then using the file system object to show them in the page; 2) insert the articles in the db splitting them in several varchar fields 3) insert the articles in the db using the text/blob fields
thanx, it's a very hard question for me!
View 1 Replies
ADVERTISEMENT
Feb 8, 2007
Hi,
My package dumps the errors into a table. The problem is, it couldnt dump Error Output column to a varchar field. I have added an script component in between to transform to string but no success.
I tried ErrorOutput.GetBlobData(0, ErrorOutput.Length)
but when I query the database, it says "System.Byte[]'
I will appreciate the responses to this post.
Thankyou,
Fahad
View 12 Replies
View Related
Jun 13, 2006
Hi,
I have a conversion application which convertts an access database to an sql server(different versions). I'm using stored procedures. The thins is that I export the OLe Object form access to SQL varbinary. what I do is to convert the binary data from the OLE Object to string using ToBase64String. The thing is that when I execute the SQL statement I get the following error:
Error:Operand type clash: text is incompatible with varbinary.
Can anyone tell me what I do wrong and how can I fix this? Thanks.
View 12 Replies
View Related
Mar 14, 2008
I have a source DB that contains a BLOB which is really a bunch of text. I am trying to use SSIS to read this BLOB and stream the chars as text to a flat file which will later be FTP'ed to another server and reloaded as nvarchar records.
In my data flow task I have my source (SQL DB BLOB) and target (Flat File) of course...in between I am using a script component to try and convert the BLOB. Here is my code:
Dim intBlobLength As Integer = Convert.ToInt32(Row.denoteblob.Length)
Dim intFinish As Integer = intBlobLength - 1
Dim byteBlob(intFinish) As Byte
byteBlob = Row.denoteblob.GetBlobData(0, intFinish)
Row.outdenoteline. = byteBlob
Row.outdebtorrowid = Row.debtorrowid
I get a pipeline is to small error. I cant seem to adjust the size of the outdenoteline within the script componenet.
please help!
Regards.
View 4 Replies
View Related
Jun 28, 2006
Hi all,
I have the following weird situation.
I must update a "text" column in my mssql db with a string that is more than 10000 character long.
I know that "text" is able to store up to 2Gbyte of data, but what is happening?
that when i excecute the query (in PHP, using the odbc_exec function), my poor Apache got stuck!!!
and afterwards, i am not even able to access that field (i mean Apache go nut again).
Have you ever experienced somthing like that? Any suggestion?
thank you
View 1 Replies
View Related
Aug 26, 2015
We have an interface where we receive data from an external supplier. One of the fields in the interface is of type BLOB (the source is an Oracle database), which would be read into our MSSQL database as image. This can also be converted to varbinary, and a typical field value looks something like:
0x70697A5F8F000000789C0DCCBD0DC2301....etc. etc.
However, we know that the origin only contains text, and we even know the text from the GUI they supply us with. The text could typically be "Delayed by 3 minutes because of water damage" or something like that.
What I want to do, is to extract that text from the field.
First, I have stored the incoming data stream in a table, where one column is of type varbinary(max). It looks like this goes swell. But I don't know which command to use in order to get the text extracted.
I have tried these:
1) select master.dbo.fn_varbintohexstr(Myfield) from Mytable
-> Returns just the text "0x70697A5F8...." which I have no interest in
2) select cast(Myfield as varchar(max)) from Mytable
-> Returns just Chinese signs.
3) select cast(Myfield as nvarchar(max)) from Mytable
-> Returns just Chinese signs.
4) declare @ptrval varbinary(16)
select @ptrval = TEXTPTR(MyField) from MyTable -- with MyField defined as image
READTEXT MyTable.MyField @ptrval 1 30
-> Returns just the text "0x697A5F8...." which I have no interest in
Of course, since only text is stored in this field, the field should never have been defined as BLOB in the first place. But the source system is external, and it's a standard system, so we may not alter it in any way.
View 2 Replies
View Related
Oct 31, 2005
i have a MSSQL 2000 database with about 30 tables in it. On one of those tables i've defined an full text index on an image field. In this table are around 500 records with binary files.
it functioned well for a time but now when i try to upload a file into the table this goes extremely slow (300 KB takes over 3 minutes).
i tried disabling "change tracking" but this didn't help a thing
adding blobs to other tables (without fulltext index on it) still goes fast.
what could be a reason that the uploading goes so slow??
View 3 Replies
View Related
Jan 22, 2008
I have followed many tutorials on selecting and replacing text in text fields, varchar fields and char fields, but I have yet to find a single script that will to all 3 based on field type. Let's assume for a moment that I don't know where all in my database a certain value that I need changed resides ... i.e., the data's tablename and fieldname. How would I go about doing the following ... or more importantly, is this even possible in a SQL only procedure?1) Loop over entire database and get all user tables2) Loop over all user tables and get all fields3) Loop over all fields and determine the field type4) switch between field types and change a string of text from 'a' to 'b'Please be gentle, I'm a procedure newb.
View 9 Replies
View Related
Aug 14, 2007
I have a table with a column of varchar(4000) and another table with 2 columns that are varchar(2000)
Is it better to make these columns text columns?
The 2 varchar(2000) columns do not need to be searched, but many of the other columns in that table do need to be searched.
The varchar(4000) column has a full text index on it.
Any help would be appreciated
Thank you
View 1 Replies
View Related
Sep 15, 2005
Hi ,
I have a website where we review cds ... the users write their own reviews ...
But when the reviews are displayed on screen all the breaks are gone and all the text comes in one block .
Can anyone advise on what to do ?
I tried to change from varchar to text but it didn't change anything.
Thanks for the help
View 4 Replies
View Related
Dec 10, 2006
Hello, I have read that microsoft is getting rid of the text datatype and replacing it with varchar. The maximum that varchar can hold is 8000 bytes. Is there a way to get above 8000 bytes without using text?
View 1 Replies
View Related
Jul 23, 2005
Hi,What is the maximum character a text type column can contain ? Can'tchange the length to upper than 16....What is the bigger ? Varchar(8000) or Text ?Regards
View 2 Replies
View Related
Mar 18, 2004
Hi all
iam trying to but a varchar variable into a TEXT var but i get this error "The assignment operator operation cannot take a text data type as an argument"
anybody know what shall i do
best regards
View 7 Replies
View Related
Jun 25, 2001
is it smarter to use the text field type or to use a varchar field type with a length of 100-150? please give me a detailed answer. thanx
View 1 Replies
View Related
Dec 11, 2007
Hello Guys.
Here is my issue i have email addresses in a column of a table in sql server. Are addreses has changed since and i need to do a mass update of these email addreses i need to replace a few char to reflect this change like ex:
AAAAA@BBB.CCC.Com i need to replace the BBB. part with nothing so that it looks like this AAAAA@CCC.Com.
Please help.
View 4 Replies
View Related
Oct 22, 2007
hi,
i would like to convert text string(field) to varchar so I can use later group by a special string.
what shall i use?
thank you
View 8 Replies
View Related
Jul 20, 2005
Hello,I have a column (text datatype) and has to send an email as a text(not attachment) using cdonts. I am reading the data from text columnstoring in a varchar field and saying cdonts.body = [data].This way I can send email to as a text format. Now, my problem is whenlength of data is greater than the 8000 chars it truncates the rest ofthe data.......and email I send is a truncated email.......loosingimporatnt data.How should I resolve this situation.......I am trying some differentideas but not worked yet. Finally, I am writting the entire content ina file and sending it as attachment but the reaquirement is to send itas a body text.Any ideas?Let me know if you need more details!Thanks,-Hayatwww.mysticssoft.com
View 1 Replies
View Related
Oct 12, 2006
I have the following form in this adress:(it's framework 1.1 asp.net vb.net)http://admin.artemrede.pt/login.aspx?ReturnUrl=%2fdefault.aspxthe utilizador is: testepalavra passe is: 12345I'm using some text datatypes and some very big varchars the problem is that when you try to add a new record or to edit a existing record, if for example in one of the very big varchars or text, textboxes, several lines of text, It only puts in the database the 2 first words that you write. I used the VS debug and apparently everything looks ok......(if it would I probably hadn't this error....) Dim OurConnection As SqlConnectionOurConnection = New SqlConnection(conn_default)Dim OurCommand As SqlCommandOurCommand = New SqlCommand("Insert Into espectaculo (foto_destaque, thumb, area_prog, nome_espectaculo, coord, nome_comp, duracao, f_etaria, sinopse, iterancia, ficha, bio_interv, bio_comp, link_comp, notas_imprensa) Values (@fotod, @thumb, @areap, @ne, @coord, @nc, @duracao, @fe, @sinopse, @it, @ficha, @bioI, @bioC, @link, @notasp)", OurConnection)If (foto_destaque.Text = "") ThenOurCommand.Parameters.Add("@fotod", SqlDbType.VarChar, 12).Value = " "ElseOurCommand.Parameters.Add("@fotod", SqlDbType.VarChar, 12).Value = foto_destaque.TextEnd IfIf (thumb.Text = "") ThenOurCommand.Parameters.Add("@thumb", SqlDbType.VarChar, 12).Value = " "ElseOurCommand.Parameters.Add("@thumb", SqlDbType.VarChar, 12).Value = thumb.TextEnd IfIf (area_prog.Text = "") ThenOurCommand.Parameters.Add("@areap", SqlDbType.VarChar, 50).Value = " "ElseOurCommand.Parameters.Add("@areap", SqlDbType.VarChar, 50).Value = area_prog.TextEnd IfIf (nome_esp.Text = "") ThenOurCommand.Parameters.Add("@ne", SqlDbType.VarChar, 100).Value = " "ElseOurCommand.Parameters.Add("@ne", SqlDbType.VarChar, 100).Value = nome_esp.TextEnd IfIf (coord.Text = "") ThenOurCommand.Parameters.Add("@coord", SqlDbType.VarChar, 100).Value = " "ElseOurCommand.Parameters.Add("@coord", SqlDbType.VarChar, 100).Value = coord.TextEnd IfIf (nome_comp.Text = "") ThenOurCommand.Parameters.Add("@nc", SqlDbType.VarChar, 50).Value = " "ElseOurCommand.Parameters.Add("@nc", SqlDbType.VarChar, 50).Value = nome_comp.TextEnd IfIf (duracao.Text = "") ThenOurCommand.Parameters.Add("@duracao", SqlDbType.VarChar, 25).Value = " "ElseOurCommand.Parameters.Add("@duracao", SqlDbType.VarChar, 25).Value = duracao.TextEnd IfIf (faixa.Text = "") ThenOurCommand.Parameters.Add("@fe", SqlDbType.VarChar, 50).Value = " "ElseOurCommand.Parameters.Add("@fe", SqlDbType.VarChar, 50).Value = faixa.TextEnd IfIf (sinopse.Text = "") ThenOurCommand.Parameters.Add("@sinopse", SqlDbType.VarChar, 8000).Value = " "ElseOurCommand.Parameters.Add("@sinopse", SqlDbType.Text, 16).Value = sinopse.TextEnd IfIf (itener.Text = "") ThenOurCommand.Parameters.Add("@it", SqlDbType.VarChar, 200).Value = " "ElseOurCommand.Parameters.Add("@it", SqlDbType.VarChar, 200).Value = itener.TextEnd IfIf (ficha.Text = "") ThenOurCommand.Parameters.Add("@ficha", SqlDbType.Text, 16).Value = " "ElseOurCommand.Parameters.Add("@ficha", SqlDbType.Text, 16).Value = ficha.TextEnd IfIf (bio_interv.Text = "") ThenOurCommand.Parameters.Add("@bioI", SqlDbType.Text, 16).Value = " "ElseOurCommand.Parameters.Add("@bioI", SqlDbType.Text, 16).Value = bio_interv.TextEnd IfIf (bio_comp.Text = "") ThenOurCommand.Parameters.Add("@bioC", SqlDbType.Text, 16).Value = " "ElseOurCommand.Parameters.Add("@bioC", SqlDbType.Text, 16).Value = bio_comp.TextEnd IfIf (linkComp.Text = "") Or (linkComp.Text = "http://") ThenOurCommand.Parameters.Add("@link", SqlDbType.VarChar, 100).Value = " "ElseOurCommand.Parameters.Add("@link", SqlDbType.VarChar, 100).Value = linkComp.TextEnd IfIf (notas_press.Text = "") ThenOurCommand.Parameters.Add("@notasp", SqlDbType.VarChar, 5000).Value = " "ElseOurCommand.Parameters.Add("@notasp", SqlDbType.VarChar, 5000).Value = notas_press.TextEnd If OurConnection.Open()OurCommand.ExecuteNonQuery()OurConnection.Close()carrega()'grid1.DataBind()End IfEnd Sub Sub carrega()conn_default = ConfigurationSettings.AppSettings("ArtemredeConnection")Dim OurConnection As SqlConnectionOurConnection = New SqlConnection(conn_default)OurConnection.Open() Dim OurCommand As SqlCommandDim SelectCommand As StringSelectCommand = "select id_espectaculo, area_prog, nome_espectaculo, nome_comp from espectaculo"OurCommand = New SqlCommand(SelectCommand, OurConnection) Dim Select_DataAdapter As New SqlDataAdapter(OurCommand)Dim Select_DataSet As New DataSet'Dim SP_DataTable_Rowcount As IntegerSelect_DataAdapter.Fill(Select_DataSet, "Espectaculos")grid1.DataSource = Select_DataSetgrid1.DataBind()OurConnection.Close() End Sub
View 2 Replies
View Related
Apr 26, 2007
I am trying to do a simple select statement on my db but keep getting the fallowing exception being thrown ...System.Web.Services.Protocols.SoapException was unhandled Actor="" Lang="" Message="System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Data.SqlClient.SqlException: The data types text and varchar are incompatible in the equal to operator. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader() at RelayService.ValidAccessID(String ID) in C:Documents and SettingsDeanMy DocumentsVisual Studio 2005ProjectsMsgSRXMsgSRXServiceApp_CodeRelayService.vb:line 193 at RelayService.SendMessage(String msg, String AccessID, Int64& MsgID) in C:Documents and SettingsDeanMy DocumentsVisual Studio 2005ProjectsMsgSRXMsgSRXServiceApp_CodeRelayService.vb:line 377 --- End of inner exception stack trace ---" Node="" Role="" Source="System.Web.Services" StackTrace: at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at ChatClient.MsgSRX.RelayService.SendMessage(String msg, String AccessID, Int64& MsgID) in C:Documents and SettingsDeanMy DocumentsVisual Studio 2005ProjectsMsgSRXChatClientWeb ReferencesMsgSRXReference.vb:line 342 at ChatClient.Form1.btnSend_Click(Object sender, EventArgs e) in C:Documents and SettingsDeanMy DocumentsVisual Studio 2005ProjectsMsgSRXChatClientForm1.vb:line 13 at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(ApplicationContext context) at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine) at ChatClient.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81 at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() ... Here is the source code to the method I am using ... Private Function ValidAccessID(ByVal ID As String) As Boolean Dim conn As New SqlConnection() conn.ConnectionString = ConfigurationManager.ConnectionStrings("dbConnect").ConnectionString Dim cmd As String cmd = "SELECT AccessID, ExpireTime " cmd &= "FROM AccessIDNumbers " cmd &= "WHERE AccessID IN ('" & ID & "')" ' cmd &= "WHERE AccessID ='@ID'" Dim C As New SqlCommand(cmd, conn) ' C.Parameters.AddWithValue("@ID", New SqlTypes.SqlString(ID)) ' C.Parameters.Item("@ID").SqlDbType = SqlDbType.Text conn.Open() Dim Count As Integer = 0 Dim reader As SqlDataReader = C.ExecuteReader Dim expired As Boolean = False If reader.HasRows Then While reader.Read Count += 1 Dim et As SqlTypes.SqlDateTime et = SqlTypes.SqlDateTime.Parse(reader("ExpireTime")) Dim ct As New SqlTypes.SqlDateTime(Now) If ct > et AndAlso expired = False Then expired = True End While End If conn.Close() C.Dispose() C = Nothing conn.Dispose() conn = Nothing Return expired = False End Function ... the problem is with the cmd &= "WHERE AccessID IN ('" & ID & "')" statement. How Can I get this to work properly!!! My data types for the AccessIDNumbers table are as fallows ..UserName -> text -> nulls not allowedAccessID -> text -> nulls not allowedCreationTime -> datatime -> nulls not allowedExpireTime -> datatime -> nulls not allowedCurrentTable -> text -> nulls allowedI don't understand why I'm getting this error!!!
View 3 Replies
View Related
Oct 27, 2007
I encounter this particular error.
Exception Details: System.Data.SqlClient.SqlException: The data types varchar and text are incompatible in the equal to operator.
Line 21: Dim reader As SqlDataReader = command.ExecuteReader()
This is the first time I'm trying out with MS SQL so I'm abit lost. I hope my code is correct and I've did a little search. I did not set "Text" in my database, I use int and varchar. Here's the affected part of my code and the database. Dim password As String = ""
Dim querystring As String = "SELECT Password FROM Member WHERE Username = @username"
'Dim conn as SqlConnection
Using conn As New SqlConnection(ConfigurationManager.ConnectionStrings("mainconnect").ConnectionString)
Dim command As New SqlCommand(querystring, conn)
command.Parameters.Add("@username", SqlDbType.Text)
command.Parameters("@username").Value = txtLogin.Text
conn.Open()
Dim reader As SqlDataReader = command.ExecuteReader()
While reader.Read()
password = reader("Password").ToString()
End While
reader.Close()
End Using
My database:
User_ID int(4)
Username varchar(50)
Password varchar(255)
Email varchar(50)
Any ideas?
View 2 Replies
View Related
Aug 16, 2000
I am trying to change a text field into a varchar 8000.
I get his error message when trying to convert.
Unable to modify table.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot create a row of size 8317 which is greater than the allowable maximum of 8060.
[Microsoft][ODBC SQL Server Driver][SQL Server]The statement has been terminated.
Anyone know of a way to either truncate the text field or
to select only those that are over the 8000 character mark?
Please advise
Thanks
Susan
View 2 Replies
View Related
Dec 18, 2002
Please, i have a big db with a "VarChar" field (8000 char) and now i need more "space".
I can use "Text" but how i can convert all my data?
If i try to change from the Enterprise Manager i loose all data!!!!
:confused: :confused: :confused:
Please, help me!
View 6 Replies
View Related
Feb 2, 2005
Hi, all
I am seting up a table with email message, I am wondering what is the max length for varchar field. I am so reluctant to use text field, since when
I run query for the descriptiona in sql analyzer, text field cannot be fully display in column. Any tricks to share?
Thanks
Betty
View 5 Replies
View Related
May 9, 2005
I have a table in which 2 of the fields are defined as TEXT. It was determined that neither of these fields would have to hold more than 3500 characters, so I changed both fields to VARCHAR (3500). The problem is that any query against this table takes 20 seconds to run. When the fields were defined as data type TEXT, queries ran lick-itty-split!? I would have expected just the opposite. Can someone explain this behavior?
View 1 Replies
View Related
May 29, 2008
I am trying to add a carriage return to the end of a text field through a script. This is what I'm trying:
UPDATE Table_Name SET Column_TEXT = Column_TEXT) + '
' WHERE Column_TEXT = 'Some text'
I also tried
UPDATE Table_Name SET Column_TEXT = Column_TEXT) + '<cr>' WHERE Column_TEXT = 'Some text'
But I keep getting the error
The data types text and varchar are incompatible in the equal to operator.
Help!!
Thanks in advance
Mangala
View 3 Replies
View Related
Oct 20, 2005
I understood that sql 2005 has EncryptByCert(varchar) function to encrypt data field. but varchar is limit by 8,000 chars long.
View 3 Replies
View Related
Jun 15, 2001
When using DTS (in SQL 7) to export via OLE DB a large varchar to a text file, it clips it at 255 chars.
No other data access drivers seem to work, either. This is lame! I cannot use bcp as a work
around, because i want to use quoted comma-delimited, which it doesn't support, and I
am using query-based export, where the query calls a stored proc, which bcp also doesn't
support.
Are there any new versions of MDAC that fix this? Anyone know a workaround? My current hack fix
is to split my field into 2, but this is a grubby fix that hassles my reciptients.
This is a pretty fundamental limitation to a major product!
dn
View 1 Replies
View Related
Mar 27, 2000
We're connecting to SQL Server 7.0 (sp2) via ODBC for our ASP application, and are having trouble saving information collected in a <textarea> tag on an HTML form. I assume the <textarea> tag contains data of type TEXT. i thought there would be no problem in converting it into a string and saving it in a VARCHAR field in the database. this works fine as long as the string is 255 characters or less. anything over that give me an "Errors Occurred" SQL Server error. the field that i'm saving this into is a VARCHAR length 8000. i thought SQL 7.0 had gotten rid of the 255 limit on varchar - could this be an ODBC driver problem (on my web server i currently have 3.50.0305) and/or should i install service pack 2 on my SQL Server? anyone advice would be much appreciated.
thanks,
matt
View 1 Replies
View Related
Jan 30, 2015
create table tblxmldata
(id int, xmltext varchar(max))
insert into tblxmldata values(1,'<associatedText><value type="PO">GTT taken</value></associatedText>')
insert into tblxmldata values(1,'<associatedText><value type="PO">Check sugar today please</value></associatedText>')
I want the output as
GTT taken
Check sugar today
View 9 Replies
View Related
Dec 16, 2007
Hi, I'm trying to improve performance for a db that stores messages. The message is currently stored in an ntext field, but when I look at all the records from the past 3 months, I found that 88% are less than 1000 characters, and 97% are less than 3000 characters. I don't want to actually limit the message size, but it seems like I might get much better performance using a varchar(3000) field to hold most of the messages, and a separate text field just used for those 3% that really are long. Is this a good idea? If so, is it better to put the Message and LongMessage fields in the same table; or, have a separate table to hold the long messages? If it is in a separate table, it would need to be left joined with the message table each time messages are retrieved.Also -- I am getting about 700 new messages daily, and right now have over 150,000 messages stored. The vast majority of activity involves new messages. Is this a good situation to look at using horizontal partitioning?Thanks for any help, I don't really have anyone to discuss this with and it is really helpful to get some other views!!
View 6 Replies
View Related
Nov 4, 1999
I am stuck! and need help!
I have a problem I can't seem to find the solution with this aweful limitations on VARCHAR fields of 255.
Within a stored procedure called Store_Check, I need to dynamically build a string (@string) using VARCHAR(255) since the text datatype can't be used in a stored procedure.
So,this string is built according to whether the Store ID is NOT NULL. So if the StoreID is not null, I start building this string 'Exec Update_Store_Address @StoreID1, @address2'. There are 20 StoreID's passed into Store_Check. IF all 20 StoreID's are not NULL, the executed String greatly exceeds 255 because the string winds up looking like this
'Exec Update_Store_Address @StoreID1, @address1 Exec Update_Store_Address @StoreID2, @address2 Exec Update_Store_Address @StoreID3, @address3 Exec Update_Store_Address @StoreID4, @address4 Exec Update_Store_Address @StoreID5, @address5 Exec Update_Store_Address @StoreID6, @address6 etc. etc.'
I am not executing this string within the StoredCheck procedure. It needs to be passed as ONE string to a VB program and it gets executed by the VB program. Even if I create 4 local variables and concatenate them, it stops at the 255th character.
Also, a local varialbe of type TEXT cannot be declared within stored procedure.
What can I do? I am stuck!
Angel
View 1 Replies
View Related
May 9, 2014
One purchased app stored user's multiple lines input into a varchar column in which including char(13) and char(10).
My app need to select this value and format to multiple lines text in one text box.
How to code to output it?
View 5 Replies
View Related
Aug 7, 2015
Impact on performance of changing Text column size.
However, many of them were regarding older releases of SQL Server.
Does the architecture in 2012, 2014 releases make this less of an issue ?
In other words, why bother going from Varchar(1000) to Varchar(50) ?
I'm just thinking maybe there is column compression automatically now.
View 4 Replies
View Related