473,379 Members | 1,367 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

ODBC SQL SERVER .. data would be Truncated!


Hey everyone ..

i have a website going .. .. ofcourse you use the Ws-FTP to upload the
photos to the page .. and i have to use SQL program to insert the file
names and values into the Database ..

i have been doing this for the longest time .. ill show u an
example below ..

Insert INTO PHoto (FOLDER, PIC_NAME, TAKEN_FROM, TAKEN_DATE, MONTH_YEAR,
DISPLAY_FOLDER, MONTH_YEAR_ID) VALUES('PHOTO BLAH BLAH BLAH .. ..
basically all the values .. the name and dates etc.

been doin it for the longest time .. excute the line and it will give me
an OK .. and my photo will be up on the website! ..

i tried uploading some files today .. and i get this weird message!

[microsoft][ODBC SQL server Driver][Sql server]String or binary data
would be truncated.

and now i can't put anythin into the database cause everytime i try to
excute and put those files up .. it gives me that error!

can anyone help plz?
--
Posted via http://dbforums.com
Jul 20 '05 #1
4 18790
Arabian143 (da**@windsorsocial.com) writes:
Insert INTO PHoto (FOLDER, PIC_NAME, TAKEN_FROM, TAKEN_DATE, MONTH_YEAR,
DISPLAY_FOLDER, MONTH_YEAR_ID) VALUES('PHOTO BLAH BLAH BLAH .. ..
basically all the values .. the name and dates etc.
....

[microsoft][ODBC SQL server Driver][Sql server]String or binary data
would be truncated.


This means that some of the values you are trying to insert is longer
than the column has foom for. For instance, assume that FOLDER is
char(20), but you try to insert 'C:\some-folder\some-sub-folder\files'
which is more than 20 chars.

If you don't care about truncation, include the statement SET ANSI_WARNINGS
OFF, and SQL will truncate in silence and not raise an error.
--
Erland Sommarskog, SQL Server MVP, so****@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2

thanx alot for responding ..

do i set the line next to the lines that im executing .. or beside them
.. or do i just execute the ANSI_warning thing by it self ..

when do i use this command and how many times do i have to use it!

thanx ..

im sorry im kind of new to this so i need exact details







This means that some of the values you are trying to insert is longer

than the column has foom for. For instance, assume that FOLDER is

char(20), but you try to insert 'C:\some-folder\some-sub-folder\files'

which is more than 20 chars.

If you don't care about truncation, include the statement SET
ANSI_WARNINGS

OFF, and SQL will truncate in silence and not raise an error.

--

Erland Sommarskog, SQL Server MVP, so****@algonet.se
--
Posted via http://dbforums.com
Jul 20 '05 #3

hi again ..

i tried that line..

is said ok ..after i executed it ..

but i still got the same error after i tried to send a file to
the database!

im so lost man!

HELP!!!!!!!!!!!!!!!





This means that some of the values you are trying to insert is longer

than the column has foom for. For instance, assume that FOLDER is

char(20), but you try to insert 'C:\some-folder\some-sub-folder\files'

which is more than 20 chars.

If you don't care about truncation, include the statement SET
ANSI_WARNINGS

OFF, and SQL will truncate in silence and not raise an error.

--

Erland Sommarskog, SQL Server MVP, so****@algonet.se
--
Posted via http://dbforums.com
Jul 20 '05 #4

nevermind i got it working

thing had too many god damn values

it was a big value .. but i had to narrow it down

but u gave me the idea and i thank u ..

bye for now
--
Posted via http://dbforums.com
Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Joe | last post by:
Python 2.4 Windows XP SP2 MS Access 2000 mx.ODBC 2.0.7 Problem data truncation occuring (here's the actual error message): mxODBC.Warning: ('01004', 5, ' String data, right truncated on...
11
by: Wolfgang Kaml | last post by:
Hello All, I have been working on this for almost a week now and I haven't anything up my sleeves anymore that I could test in addition or change.... Since I am not sure, if this is a Windows...
6
by: Andreas Lauffer | last post by:
I changed from Access97 to AccessXP and I have immense performance problems. Details: - Access XP MDB with Jet 4.0 ( no ADP-Project ) - Linked Tables to SQL-Server 2000 over ODBC I used...
11
by: DJJ | last post by:
I am using the MySQL ODBC 3.51 driver to link three relatively small MySQL tables to a Microsoft Access 2003 database. I am finding that the data from the MySQL tables takes a hell of a long time...
4
by: Andreas Lauffer | last post by:
Can anyone tell me advantages / disadvantages of DataDirect Server Wire ODBC-driver? Any experiences? What about redistribution? Andreas Lauffer, easySoft. GmbH, Germany
3
by: Lauren Quantrell | last post by:
Maybe a dumb question - I'm new to ODBC. How do I install an Access ..mde file on a user's workstation and create the ODBC connection to the backend SQL Server database without having to go through...
8
by: acb | last post by:
Hello, I am a beginner in ASP.NET and C# having programmed in VB (not the .NET flavour) in the past. I am looking for assistance in converting a functional VB.NET aspx page to C#. I am trying...
1
by: Kuldeep | last post by:
When i export data from MySQL(server 5.0) i get followng error. SQLSTATE: 01004 String data, right truncated can sombody explain why this is happenning and possible solution!!! consider it...
8
code green
by: code green | last post by:
I am using an ODBC connection to a MS Access database. When using a SELECT statement and collecting the data via php ODBC functions, I find that the data from TEXT fields is truncated to 255...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.