SQL Server does not exist or access denied

  • hello all.

    I run this:declare @h int,@objDBC int,@src varchar(255), @desc varchar(255);

    EXEC sp_OACreate 'ADODB.Connection', @objDBC OUT

    EXEC @h=sp_OASetProperty 16711422,

    'ConnectionString', 'Driver={SQL Server};

    Server=WIN-00UO3RQ0BM3;

    Database=MaliGilan;

    trusted_Connection=Yes'

    EXEC @h=sp_OAMethod 16711422, 'Open'

    print @h

    if @h<>0

    EXEC sp_OAGetErrorInfo 16711422, @src OUT, @desc OUT

    raiserror('Error 0x%x, %s, %s',16,1, @h, @src, @desc)

    but get error :

    Microsoft OLE DB Provider for ODBC Drivers, [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.

    please guide me to solve this problem step by step.

    thanks

Viewing 0 posts

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