Showing posts with label textmode. Show all posts
Showing posts with label textmode. Show all posts

Sunday, February 12, 2012

Collection cannot be modified when TextMode has been set (Microsoft.SqlServer.Smo)

Hi -

I'm trying to generate a script for User Defined Functions and I get this error:

Generate Script Progress

- Determining objects in database 'MyDBName' that will be scripted. (Success)
Messages
* Prefetch objects failed for Database 'MyDBName' . (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Prefetch+objects+Database&LinkId=20476

ADDITIONAL INFORMATION:
Collection cannot be modified when TextMode has been set (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.CollectionCannotBeModified&LinkId=20476

I'm using SQL 2005 - with SP1.

Any suggestion what am I missing....

Rakesh

Are you able to generate scripts for these objects using Management Studio? If so, then the problem is with your code, and it would be helpful if you could post the code to see your logic. If not, then there's a problem with your server.

Collection cannot be modified when TextMode has been set (Microsoft.SqlServer.Smo)

Hi -

I'm trying to generate a script for User Defined Functions and I get this error:

Generate Script Progress

- Determining objects in database 'MyDBName' that will be scripted. (Success)
Messages
* Prefetch objects failed for Database 'MyDBName' . (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Prefetch+objects+Database&LinkId=20476

ADDITIONAL INFORMATION:
Collection cannot be modified when TextMode has been set (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.CollectionCannotBeModified&LinkId=20476

I'm using SQL 2005 - with SP1.

Any suggestion what am I missing....

Rakesh

Are you able to generate scripts for these objects using Management Studio? If so, then the problem is with your code, and it would be helpful if you could post the code to see your logic. If not, then there's a problem with your server.