Showing posts with label atable. Show all posts
Showing posts with label atable. Show all posts

Wednesday, March 7, 2012

Error message: String or binary data truncated

Hi, all!
I encountered that error message while testing my application using
MSDE. It appears when I issue this type of statement:
INSERT INT atable (Col1, Col2, ...)
VALUES (Val1, Val2,...)
The string columns are of type 'char'.
The strange is that the message does not appear always. In one case I
had error in two consecutive executions of the query. After that, in the
3rd execution *with exactly the same data!* all went OK!? I cannot
understand where lies the problem.
The same thing does not happen at all when testing with MS SQL Server 2000.
Please, can somebody give me a hint about what probably goes on.
hi Lazar,
Lazar Videnov wrote:
> Hi, all!
> I encountered that error message while testing my application using
> MSDE. It appears when I issue this type of statement:
> INSERT INT atable (Col1, Col2, ...)
> VALUES (Val1, Val2,...)
> The string columns are of type 'char'.
> The strange is that the message does not appear always. In one case I
> had error in two consecutive executions of the query. After that, in
> the 3rd execution *with exactly the same data!* all went OK!? I cannot
> understand where lies the problem.
> The same thing does not happen at all when testing with MS SQL Server
> 2000.
> Please, can somebody give me a hint about what probably goes on.
are you sure this is not depending on the provided values exceeding the
maximum storage of the columns?
DECLARE @.t TABLE (
c char(5)
)
INSERT INTO @.t VALUES ( 'abcdefghi' )
--<--
Server: Msg 8152, Level 16, State 9, Line 4
String or binary data would be truncated.
The statement has been terminated.
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.12.0 - DbaMgr ver 0.58.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||Hi,
Actually, I don't do any checks for exceeding the storage space in the
string columns. I thought about that, but the strange is that this error
happens only sometimes. That is why I'm curious. And, as I wrote, it
works all fine in MS SQL Server 2000. I thought that the server just
trims the data and everything is OK.
Now, I'll make sure that I pass strings with length less than the
definition of the column, and I'll test again.
thanks

Friday, February 24, 2012

Error message opening table in enterprise manager

I am new to sql server and after installing enterprise manager at my
workstation I am getting the following error message when I try to open a
table in my database:
an unexpected error happened during this operation;
[ms design tools] class not registered
Basically one or more DLL's in the %Program Files%\Common Files\Microsoft
Shared\MSDeisgner98 or MSDesigner7 directories have not been registered
correctly. You can check the %WINDIR%\SQLSTP.LOG and %WINDIR%\SQLSP.LOG log
files to identify any DLL's where there was an issue with registering the
DLL's. You will then need to manually register any DLL's that reported an
issue using regsvr32.
ie.
regsvr32.exe /u "C:\Program Files\Common Files\Microsoft
Shared\MSDesigners98\<DLLNAME>"
or
regsvr32.exe "C:\Program Files\Common Files\Microsoft
Shared\MSDesigner7 \<DLLNAME>"
The following Goggle Groups thread provides additional details
http://shrinkster.com/9g6.
- Peter Ward
WARDY IT Solutions
"gerry m" wrote:

> I am new to sql server and after installing enterprise manager at my
> workstation I am getting the following error message when I try to open a
> table in my database:
>
> an unexpected error happened during this operation;
> [ms design tools] class not registered
>
|||Thank you very much, I will try as soon as I digest my turkey dinner! Have a
wonderful holiday.
Gerry
"P. Ward" wrote:
[vbcol=seagreen]
> Basically one or more DLL's in the %Program Files%\Common Files\Microsoft
> Shared\MSDeisgner98 or MSDesigner7 directories have not been registered
> correctly. You can check the %WINDIR%\SQLSTP.LOG and %WINDIR%\SQLSP.LOG log
> files to identify any DLL's where there was an issue with registering the
> DLL's. You will then need to manually register any DLL's that reported an
> issue using regsvr32.
> ie.
> regsvr32.exe /u "C:\Program Files\Common Files\Microsoft
> Shared\MSDesigners98\<DLLNAME>"
> or
> regsvr32.exe "C:\Program Files\Common Files\Microsoft
> Shared\MSDesigner7 \<DLLNAME>"
> The following Goggle Groups thread provides additional details
> http://shrinkster.com/9g6.
>
> - Peter Ward
> WARDY IT Solutions
>
> "gerry m" wrote:

Error message opening table in enterprise manager

I am new to sql server and after installing enterprise manager at my
workstation I am getting the following error message when I try to open a
table in my database:
an unexpected error happened during this operation;
[ms design tools] class not registeredBasically one or more DLL's in the %Program Files%\Common Files\Microsoft
Shared\MSDeisgner98 or MSDesigner7 directories have not been registered
correctly. You can check the %WINDIR%\SQLSTP.LOG and %WINDIR%\SQLSP.LOG log
files to identify any DLL's where there was an issue with registering the
DLL's. You will then need to manually register any DLL's that reported an
issue using regsvr32.
ie.
regsvr32.exe /u "C:\Program Files\Common Files\Microsoft
Shared\MSDesigners98\<DLLNAME>"
or
regsvr32.exe "C:\Program Files\Common Files\Microsoft
Shared\MSDesigner7 \<DLLNAME>"
The following Goggle Groups thread provides additional details
http://shrinkster.com/9g6.
- Peter Ward
WARDY IT Solutions
"gerry m" wrote:

> I am new to sql server and after installing enterprise manager at my
> workstation I am getting the following error message when I try to open a
> table in my database:
>
> an unexpected error happened during this operation;
> [ms design tools] class not registered
>|||Thank you very much, I will try as soon as I digest my turkey dinner! Have
a
wonderful holiday.
Gerry
"P. Ward" wrote:
[vbcol=seagreen]
> Basically one or more DLL's in the %Program Files%\Common Files\Microsoft
> Shared\MSDeisgner98 or MSDesigner7 directories have not been registered
> correctly. You can check the %WINDIR%\SQLSTP.LOG and %WINDIR%\SQLSP.LOG l
og
> files to identify any DLL's where there was an issue with registering the
> DLL's. You will then need to manually register any DLL's that reported an
> issue using regsvr32.
> ie.
> regsvr32.exe /u "C:\Program Files\Common Files\Microsoft
> Shared\MSDesigners98\<DLLNAME>"
> or
> regsvr32.exe "C:\Program Files\Common Files\Microsoft
> Shared\MSDesigner7 \<DLLNAME>"
> The following Goggle Groups thread provides additional details
> http://shrinkster.com/9g6.
>
> - Peter Ward
> WARDY IT Solutions
>
> "gerry m" wrote:
>