Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Database Access / January 2005



Tip: Looking for answers? Try searching our database.

Application error -2147217833 String or binary data would be trunc

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dk - 28 Jan 2005 18:03 GMT
This application is VB6 using SQL Server - when trying to run a click a
button to run an update command the following error is displayed:
"Application error -2147217833 String or binary data would be truncated"
and then
"Run-time error 35600 Index out of bounds."

It is happening when clicking update on two different places. The application
did not have this problem in the past. Also, the error is only happening on
1 pc, and does not occur when tested on 2 others.

Any ideas on what to look at to fix this problem?

Thanks,
dk
Jan Hyde - 31 Jan 2005 09:10 GMT
"dk" <dk@discussions.microsoft.com>'s wild thoughts were
released on Fri, 28 Jan 2005 10:03:03 -0800 bearing the
following fruit:

>This application is VB6 using SQL Server - when trying to run a click a
>button to run an update command the following error is displayed:
[quoted text clipped - 7 lines]
>
>Any ideas on what to look at to fix this problem?

If your database field is 10 characters and you try to put
11 or more into it you will get the error 'String or binary
data would be truncated'

It happens on 1 PC because that user has typed in more that
the database allows. Your program should prevent them from
doing this.

Jan Hyde (VB MVP)

Signature

Misery: A collection of misers. (Leo Roston)

[Abolish the TV Licence - http://www.tvlicensing.biz/]

dk - 31 Jan 2005 13:43 GMT
The exact same values are typed into both applications -
any other possible ideas?

Thanks,
dk

> "dk" <dk@discussions.microsoft.com>'s wild thoughts were
> released on Fri, 28 Jan 2005 10:03:03 -0800 bearing the
[quoted text clipped - 21 lines]
>
> Jan Hyde (VB MVP)
Jan Hyde - 31 Jan 2005 14:06 GMT
"dk" <dk@discussions.microsoft.com>'s wild thoughts were
released on Mon, 31 Jan 2005 05:43:02 -0800 bearing the
following fruit:

>The exact same values are typed into both applications -
>any other possible ideas?
>
>Thanks,
>dk

Why not look at the SQL the causes the error, then all you
have to do is compare the data with the database field
sizes.

J

>> "dk" <dk@discussions.microsoft.com>'s wild thoughts were
>> released on Fri, 28 Jan 2005 10:03:03 -0800 bearing the
[quoted text clipped - 21 lines]
>>
>> Jan Hyde (VB MVP)

Jan Hyde (VB MVP)

Signature

Wear short sleeves! Support your right to bare arms! (Aiken Drum)

[Abolish the TV Licence - http://www.tvlicensing.biz/]

dk - 31 Jan 2005 16:25 GMT
The same process has worked correctly on three other machines.
This leads me to believe that the sql is ok. I believe something else
may be causing the error. MDAC versions are very similar. Is it possible that
the error is misleading and that it indicates another type of problem
besides field sizes?

> "dk" <dk@discussions.microsoft.com>'s wild thoughts were
> released on Mon, 31 Jan 2005 05:43:02 -0800 bearing the
[quoted text clipped - 39 lines]
>
> Jan Hyde (VB MVP)
Jan Hyde - 31 Jan 2005 17:14 GMT
"dk" <dk@discussions.microsoft.com>'s wild thoughts were
released on Mon, 31 Jan 2005 08:25:28 -0800 bearing the
following fruit:

>The same process has worked correctly on three other machines.
>This leads me to believe that the sql is ok. I believe something else
>may be causing the error. MDAC versions are very similar. Is it possible that
>the error is misleading and that it indicates another type of problem
>besides field sizes?

In 100% of cases that I have encountered this error it's
because the SQL it trying put data into a field that cannot
accept that much data with truncating it.

If this data is entered by the user then the machine it runs
on, or the version of MDAC are irrelevant.

***Look at the SQL that causes the problem***

J

>> "dk" <dk@discussions.microsoft.com>'s wild thoughts were
>> released on Mon, 31 Jan 2005 05:43:02 -0800 bearing the
[quoted text clipped - 39 lines]
>>
>> Jan Hyde (VB MVP)

Jan Hyde (VB MVP)

Signature

Lysdexia: a peech imspediment we live to learn with. (Ed Hexter)

[Abolish the TV Licence - http://www.tvlicensing.biz/]

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.