db_name can't find the object sp_name

  • I'm working on an access 2000 data project linked to sql server 2000.

    Recently users started to get error messages like the one above. I've corrected this by adding the prefix 'dbo.' to all stored procedure calls but i'm just wondering what has prompted this change. The database has been running fine for the last couple of years. I haven't made any changes to the sql server database settings or security.

    Also users have started to get error messages of the type:

    Procedure 'sproc_name' expects parameter '@param' which was not supplied

    even though the parameter HAS been supplied. Example below:

    Function ServiceCODE_MachineDetails(StrSVCCODE As String) As ADODB.Recordset

    Dim cmd As New ADODB.Command

    Dim par As ADODB.Parameter

    Dim rs As New ADODB.Recordset

    With cmd

    '.CommandType = adCmdStoredProc

    .CommandType = adCmdStoredProc

    .ActiveConnection = CurrentProject.Connection

    .CommandText = "dbo.sp_ServiceCode_MachineDetails"

    .Parameters.Refresh

    .Parameters("@SVCCODE") = StrSVCCODE

    End With

    Set rs = cmd.Execute

    Set ServiceCODE_MachineDetails = rs

    End Function

    Any help on this would be much appreciated,

    Peter

  • Setting up the users as system administrators under server roles has solved this problem.

  • Whoa! That is a bad idea. By making the users System Administrators they now have the ability to do ANYTHING they want to any database on the server.

    I'd start by running a profiler trace on the database when someone without sysadmin privileges runs the application.

    Can you post your connection string?

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

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