OPEN ROWSET Issues

  • I have an application that I inherited from another developer this past year that is used for the strategic analysis of wildland fire.  This asp.net application lets the user upload a proprietary data set format that can be read with the Jet engine.  The previous developer decided to read this data from a stored procedure using OPEN ROWSET.  This application is really only used during fire season (May-October) and was working fine last summer.  Now, the stored procedure keeps crapping out on me until I restart the server.  Once or twice I can live with, but this is becoming a problem the more users start to use it.  The exception is just a general one saying that the jet engine returned an error, pretty generic and useless.  I was just wondering if someone else may have run into a similar problem, or has any insights into using the Jet engine and proprietary formats that can be read with it from within a stored procedure.

  • I'm not sure if you were able to find a solution yet, but if the problem is intermittent it may be that the source file is open and locked by another user.

    I've seen these types of errors with ms excel.

    Scott

  • Each user uploads a unique file based on their session ID, the file is renamed, saved to the filesyystem, then opened using the stored procedure.  It seems to be working today even when I upload the same file back-to-back.  It is very frustrating...

  • When they are copied do they get changed to the same name? If so the filesystem could have had the file locked. Have had this happen before using excel this way. Decided better to import to a table internally so concurrent users don't run that risk.

  • EXEC ('

    SELECT OldObjectID = a.OldObjectID

    FROM OPENROWSET

    (''sqloledb'', ''SERVER='+@ImportServer+';Trusted_Connection=yes''

    , '''+@SQL+'''

    ) AS a')

    I have this query in which the select part executes fine but the drop part does not execute.I have checked the connection and permissions and everything is fine and morever if i execute the below mentioned query i am able to drop the table ....kindly help

    SELECT @SQL = 'SELECT OldObjectID = OBJECT_ID(''Import..'+@TableName+''')

    SET IMPLICIT_TRANSACTIONS OFF

    IF OBJECT_ID(''Import..'+@TableName+''') IS NOT NULL

    DROP TABLE Import.dbo.'+@TableName

Viewing 5 posts - 1 through 4 (of 4 total)

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