
We are doing upgrade from GP9 to GP2010. In VBA code, we have changed the RetrieveGlobals9.retrieveuserinfo to the UserInfoGet connection object, there is no problem to get data from database. If data come from linked Server, we will see this error.
[Microsoft][SQL Native Client][SQL Server]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.
In the GP9, we can set AnsiNPW to Yes, how can I set it in VBA code on GP2010?
Please could anybody give me advice on what to do?
Thanks a lot
*This post is locked for comments
I have the same question (0)If you need to get data from a linked server, usually what you need to do is enable ANSI NULLS and ANSI WARNINGS on the datasource used to connect to the database. The problem is with UserInfoGet, it uses the system DSN to connect to GP and for GP, that DSN should not be configured in that way. You can't change the connection string now for the object that userinfoget returns back to you, so if you need to retreive data from a linked SQL server, what you need to do instead is you have to create your own ADO connection object to connect to the server.
Regards,
-Greg