SET ANSI_WARNING

Posts   
 
    
wvnoort
User
Posts: 96
Joined: 06-Jan-2005
# Posted on: 06-Nov-2006 16:48:21   

Is there a way to send additional set statements to SqlServer like SET ANSI_WARNING OFF when dynamically creating typed views?

I am trying to replace a stored procedure by a dynamic typed list where some SET statements are required to suppress arithmatic conversion errors.

jbb avatar
jbb
User
Posts: 267
Joined: 29-Nov-2005
# Posted on: 06-Nov-2006 17:17:54   

Hello,

Are you using selfservices or an adapter ? Do you want to use typed view or typed list?

wvnoort
User
Posts: 96
Joined: 06-Jan-2005
# Posted on: 07-Nov-2006 09:17:49   

I am using Adapter and building typed lists as described in the LLBLGen documentation (Using the generated code, Adapter, Using typed lists and typesd views, Creating Dynamic Lists).

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 07-Nov-2006 10:41:38   

You could override the adapter method OnFetchTypedList and put the set ansiwarning off statement before the query text in the passed in RetrievalQuery object. That retrievalquery object is executed right after that method, so it's the way to perform this operation.

Frans Bouma | Lead developer LLBLGen Pro