Have you guys already experience this problem?

Results 1 to 8 of 8
  1. #1
    Apprentice logicfreak is offline
    MemberRank
    Apr 2011 Join Date
    17Posts

    Have you guys already experience this problem?

    I have an error in my website. I think I have sandurr's files. The one with rPTDB. I can't make it work. Everytime I try to connect to my IIS I always get this error:

    Cannot open database "rPTDB"... Login failed. /functions/database.asp, line 17

    I got the scripts. Two of them are the only who have USE[database]. And only those two got problem whenever I try to execute it. I also observed that even the code got error. It still execute cause I've seen it creates table. So I leave it then when I go to my IIS I got that weird problem. I looked at line 17 and I guess there is nothing wrong with that one. So the levellist and RPTDB script onl got the problem when executing and also they are the only script who got USE[db] code. Maybe that's the reason why I can't access to my IIS without any problem. Anyone can help me out here? I'm really stuck atm.


  2. #2
    Fuck. SheenBR is offline
    ModeratorRank
    Feb 2008 Join Date
    BrazilLocation
    2,434Posts

    Re: Have you guys already experience this problem?

    Possible causes:

    1- Missing database
    2- Bad sql password/host config

  3. #3
    Omega bobsobol is offline
    MemberRank
    May 2007 Join Date
    UKLocation
    5,702Posts

    Re: Have you guys already experience this problem?

    3- Bad connect string (part of which is user and pass, as Sheen has already mentioned)

    Remember, there are several ways you could connect to SQL DB. If you use something like ODBC driver, and ODBC is not set up the way connection string expects, you will have problems. (I think)

  4. #4
    Apprentice logicfreak is offline
    MemberRank
    Apr 2011 Join Date
    17Posts

    Re: Have you guys already experience this problem?

    I think its not about bad sql user/pass. I think its missing database. Everytime I try to execute the code levellist at accountdb I got this error.

    Msg 911, Level 16, State 1, Line 1
    Could not locate entry in sysdatabases for database 'AccountDb'. There is no entry with that name. Make sure that the name is spelled correctly.

    same as rPTDB, those script who uses USE[db]. This is the script Im using.

    USE [AccountDb]
    GO
    /****** Object: Table [dbo].[LevelList] Script Date: 09/28/2007 08:07:57 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    SET ANSI_PADDING ON
    GO
    CREATE TABLE [dbo].[LevelList](
    [CharName] [varchar](50) NULL,
    [CharLevel] [int] NULL,
    [CharClass] [varchar](50) NULL,
    [ID] [int] NULL
    ) ON [PRIMARY]

    GO
    SET ANSI_PADDING OFF

    then the script Im using for RPTDB is:

    USE [rPTDB]
    GO
    /****** Object: Table [dbo].[LevelList] Script Date: 09/28/2007 08:07:57 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    SET ANSI_PADDING ON
    GO
    CREATE TABLE [dbo].[LevelList](
    [CharName] [varchar](50) NULL,
    [CharLevel] [int] NULL,
    [CharClass] [varchar](50) NULL,
    [ID] [int] NULL
    ) ON [PRIMARY]

    GO
    SET ANSI_PADDING OFF

    I see those codes want to create table. But it can't, because it can't execute. Also when I double clicked the error. It moves me to the first line which is USE[DB]. I don't know what's wrong with the USE[DB] function why it doesn't work.

  5. #5
    Fuck. SheenBR is offline
    ModeratorRank
    Feb 2008 Join Date
    BrazilLocation
    2,434Posts

    Re: Have you guys already experience this problem?

    then create the rPTDB database. Those codes create the TABLE inside a database. You cant create a table inside a database that doesnt exists!
    Last edited by SheenBR; 23-04-11 at 01:29 PM.

  6. #6
    Apprentice logicfreak is offline
    MemberRank
    Apr 2011 Join Date
    17Posts

    Re: Have you guys already experience this problem?

    I've figured own now the problem. I got crap esset which is doing something wrong. I disabled it first then reinstall then all script executes fine. Btw thanks for the time in answering my question.

  7. #7
    Fuck. SheenBR is offline
    ModeratorRank
    Feb 2008 Join Date
    BrazilLocation
    2,434Posts

    Re: Have you guys already experience this problem?

    no problem, you're welcome.

  8. #8
    The ruler of your mind! telatoro is offline
    MemberRank
    Nov 2004 Join Date
    somewhere in your mindLocation
    384Posts

    Re: Have you guys already experience this problem?

    Quote Originally Posted by logicfreak View Post

    Msg 911, Level 16, State 1, Line 1
    Could not locate entry in sysdatabases for database 'AccountDb'. There is no entry with that name. Make sure that the name is spelled correctly.
    the message was very clear, the database "AccountDb" was not found in the catalog, someway the way you execute the scripts or the user doesnt have enough permissons to use that database.



Advertisement