I am passing a datatable from Code to stored procedure in this way.

DataTable table = CommonFunctions.ToDataTable(request);
object[] spParams = new object[1];
spParams[0] = table;

DbCommand dbCommand = 
  db.GetStoredProcCommand("OS_UpdateOrgStructureDetails", spParams);

I am trying to access this parameter in stored proc.

CratePROCEDURE OS_UpdateOrgUnits  
 @table OS_RenameNodeTable READONLY  
AS  
BEGIN  
    UPDATE OrgUnit  
    SET DetailName = ut.NewValue  
    FROM @table ut  
    INNER JOIN OrgUnit ou ON ou.OrgUnitID = ut.OrgUnitID  
END 

But when the call is made to stored procedure it throws an error.

The incoming tabular data stream (TDS) remote procedure call (RPC) protocol 
stream is incorrect. Table-valued parameter 1 ("@table"), row 0, column 0: 
Data type 0xF3 (user-defined table type) has a non-zero length database name 
specified.  Database name is not allowed with a table-valued parameter, only 
schema name and type name are valid.

Not able to resolve the error.

Edit
Report