Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Returned an unexpected data length

Author  Topic 

dowens
Yak Posting Veteran

82 Posts

Posted - 2005-09-09 : 15:20:45
I do not understand why I'm getting this error.
Can anyone help?

MS 2000 server
linked two MS 2000 servers along with setting up logon.

mbrid is a varchar(12) SQLTEST
memberno is a varchar(50) on WHSQL

I'm receiving this error:
Server: Msg 7347, Level 16, State 1, Line 1
OLE DB provider 'SQLOLEDB' returned an unexpected data length for the fixed-length column '[SQLTEST].[fl1st].[dbo].[tbl_Members].MBRID'. The expected data length is 12, while the returned data length is 10.
OLE DB error trace [Non-interface error: Unexpected data length returned for the column: ProviderName='SQLOLEDB', TableName='[SQLTEST].[fl1st].[dbo].[tbl_Members]', ColumnName='MBRID', ExpectedLength='12', ReturnedLength='10'].


Created the following query:
select
M.Mbrid,
O.memberno
from whsql.optix.dbo.memberimages O
left join
sqltest.fl1st.dbo.tbl_members M on O.memberno = M.MBRID
where o.memberno = '11111111-01'

nr
SQLTeam MVY

12543 Posts

Posted - 2005-09-09 : 18:00:57
Try dropping the linked server and adding it again.
Also reboot both servers.

I would possibly expect this sort of thing to happen if you had run the query then changed the size of MBRID or maybe if it had been changed from char to varchar via an alter table (if that's the case then recreate the table)

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

dowens
Yak Posting Veteran

82 Posts

Posted - 2005-09-12 : 09:39:38
I did as you indicated above.
However, I still have the same problem.

Could the fact that the server I'm linking to refreshes daily and switches db's once the refresh is complete (takes 9hrs to refresh)?
Go to Top of Page
   

- Advertisement -