• Not simple to investigate from the SQL Server side of things. Doing "sp_helptext sp_columns_ex", I find this:

    from

    sys.fn_remote_columns (@table_server,@table_catalog,NULL,NULL,NULL) c, -- (1)

    sys.fn_remote_provider_types (@table_server, NULL, NULL) p -- LUXOR/KAGERA don't support restricting DATA_TYPE

    sys.fn_remote_columns is not accessible directly it seems, but obviously it invokes the provider to get the metadata.

    What you could so is to run the corresponding to Profiler on AS400 to see what queries your call to sp_columns_ex generates. Of course, that requires that you have some knowledge about AS400 - I for sure does not!

    By the way, you mentioned ODBC. But you are not using ODBC for the access to AS400, I hope, but an OLE DB provider?

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]