473,655 Members | 3,072 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

string or binary data woulb be truncated exception when trying to savefile to databas

1 New Member
I'm trying to save file data to sqlserver. file data is converted to sysyte.io.strea m and passed through webservice and in Business layer i changed the stream to byte[] array and passed it as a parameter to my stored procedure. Image file or storing in database. but when i try to save a text file its giving an exception "string or binary data would be truncated \r\n the statement has terminated".
I used sqlDBType.Image for the parameter tyep. and in stored procedure i used image data type for that parameter and in database also i used the same imaga datatype for that field. can any body solve my problem.
Thanks in advance.

Dileep Kumar
Oct 12 '06 #1
0 1754

Sign in to post your reply or Sign up for a free account.

Similar topics

3
40174
by: RDRaider | last post by:
How can I find which record(s) cause this error: Server: Msg 8152, Level 16, State 9, Line 1 String or binary data would be truncated. The statement has been terminated. I have tried Profiler but I can't get it to tell me which records are causing the error. Here's the script I'm running: EXEC sp_executesql N'UPDATE IMDISFIL_SQL
0
1258
by: benh | last post by:
Does anyone have any insight into how Application Center Test handles binary data in a response body? My problem: I need some specific data from inside a PDF file that is coming down as the response body. The response contains binary data mixed with plain text which is where my data lies. Unfortunately, when I print the response body to the Trace Log it is truncated. The response ContentLength is about 21,000 bytes so I have used...
1
2804
by: Bernie Yaeger | last post by:
What causes the error 'string or binary data would be truncated'? Here's the routine that sometimes causes the error, sometimes not: irow("ctotal") = FormatCurrency(irow("total"), 2, TriState.False, TriState.True, TriState.True) ctotal is a char column in an sql server table; total is a currency column in the same table. Notwithstanding, the conversion appears to be made, even though the exception is being thrown. Any help would be...
1
8068
by: languy | last post by:
Hi there I'm having a problem when using the SqlDataAdapter. When calling the Update(DataSet, string) method I get the following error message "String or binary data would be truncated". The rows neither have data that exceeds 8000 chars nor contain any LOB fields. Furthermore the data is transferred between two tables that are bitwise identical. -- snip -- System.Data.SqlClient.SqlCommand command =
20
1574
by: John Salerno | last post by:
Here's the code I wrote: file = open('C:\switches.txt', 'r') switches = file.readlines() i = 0 for line in switches: line = switches i += 1
6
13321
by: dtarczynski | last post by:
Hello. I have problem when i inserting strings with special characters into MS SQL 2005 database for example: http://www.netsprint.pl/serwis/search?q=http%3A%2F%2Fwww%2Ejobpilot%2Epl%2Fprofile%2Frss20%2F%3Ftitle%3Djobpilot%2Epl%2B%2D%2Boferty%2Bpracy%26region%5B%5D%3D505%26appkind%5B%5D%3D1%2C2%26language%5B%5D%3D11%26profession%5B%5D%3D12%2C65%2C14%2C59%26industry%5B%5D%3D19%2C48%2C23%2C24%2C16%2C33%2C26%26limit%3D10 Then i getting this...
7
17705
Coldfire
by: Coldfire | last post by:
i am having error ....details are ASP.Net application...in which I have a textbox <asp:TextBox ID="Other" TextMode=SingleLine CssClass="serviceBox" Width="250" Height="45" Runat="server" MaxLength="1000" /></asp:TextBox> and this textbox is in a <asp:Repeater > which has the count of 35. The textbox value is stored in the SQL DB And the field data-type in the SQL DB is VARCHAR(1000)
10
2816
by: Mo | last post by:
Hi, I am trying to write a code to build a string 768 characters long. This string is going to be written to a file which is then read by another application. The format of the string is already defined. For example Firstname starts at position 20, Last Name at position 30, address at position 40 etc... I am reading these data from sql datasource and must substitute the values in the exact position insuring that paramteres end up...
6
10554
by: fnoppie | last post by:
Hi, I am near to desperation as I have a million things to get a solution for my problem. I have to post a multipart message to a url that consists of a xml file and an binary file (pdf). Seperately the posting words fine but when I want to create one multipart message with both then things go wrong. The binary file is converted and of datatype byte() The xml file is just a string.
0
8296
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8497
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8598
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7310
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5627
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4299
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1928
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.