check if the table exists

  • Hi,

    This my first time using the link server to read the files directly from within SQL2005, so issues the following link:-

    EXEC sp_addlinkedserver

    @server = N'MYVFPSERVER', -- Your linked server name here

    @srvproduct=N'Visual FoxPro 9', -- can be anything

    @provider=N'VFPOLEDB',

    @datasrc=N'"C:\PROGRAM FILES\MICROSOFT VISUAL FOXPRO 9\Samples\data\testdata.dbc"'

    After that i can open query and do the import issues, but how can check if the table exists before issues the query.

    Best regards

  • check in [yourdb].sys.tables to see if that table exist.

  • Two system procs:

    sp_catalogs and

    sp_tables_ex

    will give you remote catalogs and tables.

    DAB

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply