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.
| Author |
Topic |
|
iminore
Posting Yak Master
141 Posts |
Posted - 2005-08-16 : 07:56:58
|
| This procedure:CREATE PROCEDURE procSearch @find varchar(80)ASset nocount onexec('set ansi_nulls on set ansi_warnings on select fileindex, filename from OpenQuery(kmserver, ''select fileindex, filename from scope() where freetext(contents,''''' + @find + ''''')'')')GOis giving the error:Heterogeneous queries require the ANSI_NULLS and ANSI_WARNINGS options...Yet it works in query analyser. the proc is to do with Indexing Services, if relevant. |
|
|
iminore
Posting Yak Master
141 Posts |
Posted - 2005-08-16 : 08:33:00
|
| I'll answer my own question.If I compile the procedure with:set ansi_nulls onset ansi_warnings on then it works.Now how do I ensure that always happens? |
 |
|
|
SQLTEAMSteve
Starting Member
8 Posts |
Posted - 2005-08-18 : 13:34:29
|
| CREATE PROCEDURE procSearch@find varchar(80)ASset nocount onset ansi_nulls onset ansi_warnings on exec('set ansi_nulls on set ansi_warnings on select fileindex, filename from OpenQuery(kmserver, ''select fileindex, filename from scope() where freetext(contents,''''' + @find + ''''')'')')set ansi_nulls offset ansi_warnings offset nocount off_________________________Stephen R Montgomery |
 |
|
|
|
|
|