By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,288 Members | 1,058 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,288 IT Pros & Developers. It's quick & easy.

ODBC SQL SERVER .. data would be Truncated!

P: n/a

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
Share this Question
Share on Google+
4 Replies

P: n/a
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

P: n/a

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

P: n/a

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

P: n/a

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 discussion thread is closed

Replies have been disabled for this discussion.