Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can Openrowsource() be used in a stored procedure?
Message
 
 
To
31/07/2006 07:38:11
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Environment versions
SQL Server:
SQL Server 2000
Miscellaneous
Thread ID:
01141748
Message ID:
01141766
Views:
34
This message has been marked as the solution to the initial question of the thread.
You have to set those properties when you create SP.
SET ANSI_NULLS    ON
SET ANSI_WARNINGS ON
CREATE ...
>>Msg caption-Macrosoft SQL-DMO(ODBC SQLState-42000)
>>Error:7405.Heterogeneous queries require the ANSI_NULLS and ANSI_WARNINGS options to be set for the connection.This ensures consistent query semantics.
>>Enable these options and then reissue your query.
>>
>>-I already have enabled these options in server properties,but seems no effect.Have you gotten the testing passed?
>
>
>>What happens if you put:
>
>SET ANSI_NULLS ON
>SET ANSI_WARNINGS ON
>
>SELECT a.* FROM
> OPENROWSET('MICROSOFT.JET.OLEDB.4.0',
> 'Text;Database=D:\textfile\;',
>> 'SELECT * FROM [20060710000#txt]' ) a
>
>Still showing the same error msg.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform