Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  1. #1
    New Coder
    Join Date
    Dec 2005
    Location
    Texas
    Posts
    60
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Permission denied: 'dbConn'

    I have been trying to install an ASP ticketing system written in ASP and using SQL Express Database.

    All database tables are configured, however, when I attempt to log in I get the following error.

    Active Server Pages error '00000000'

    Create object failed

    ?

    An error occurred while creating object 'dbConn'.

    Microsoft VBScript runtime error '800a0046'

    Permission denied: 'dbConn'

    /helpCentricLoginConfirm.asp, line 49



    Thanks for yor help..

  • #2
    Regular Coder
    Join Date
    Mar 2007
    Posts
    505
    Thanks
    1
    Thanked 19 Times in 19 Posts
    This is probably a username/password issue. Your dbConn statement is also probably using a DSNLess connection, in which you have to specify the username and password to connect to your database.

    Look at the code that defines dbConn and make sure you are using the right username and password.

    If you are, make sure that user exists in the SQL database.
    To say my fate is not tied to your fate is like saying, 'Your end of the boat is sinking.' -- Hugh Downs
    Please, if you found my post helpful, pay it forward. Go and help someone else today.

  • Users who have thanked Daemonspyre for this post:

    Pinto7 (08-20-2007)

  • #3
    New Coder
    Join Date
    Dec 2005
    Location
    Texas
    Posts
    60
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Thanks for the fast response,

    I will post the connection code here shortly..

    I assumed also is was a user/password issue, but I know I can connect to the SQL server through SQL server Stuio express with teh same user/Password I have in my connection string.

    Everything looks good on the connection string and on the SQL Server.

    but for some reason I keep getting this error.

  • #4
    New Coder
    Join Date
    Dec 2005
    Location
    Texas
    Posts
    60
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Im using the following as my connection string

    Code:
    Provider=SQLOLEDB;Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
    The DB Name and username/password are all verified correct

  • #5
    Regular Coder
    Join Date
    Mar 2007
    Posts
    505
    Thanks
    1
    Thanked 19 Times in 19 Posts
    What exactly does line 49 state?

    Also try this:

    Code:
    dbConn.open "Provider=SQLOLEDB;Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;"
    '
    if dbConn.State = 1 then 
        response.write(" You have successfully connected to the database ")
    else
        response.write(" You have not connected ")
    end if
    To say my fate is not tied to your fate is like saying, 'Your end of the boat is sinking.' -- Hugh Downs
    Please, if you found my post helpful, pay it forward. Go and help someone else today.

  • #6
    New Coder
    Join Date
    Dec 2005
    Location
    Texas
    Posts
    60
    Thanks
    2
    Thanked 0 Times in 0 Posts
    The connection string resides ina file called global.asa

    The Line 49 code resides in file helpCentricLoginConfirm.asp
    the code on line 49 is ""dbconn.open connectstr" the entire code is listed below
    Code:
    '##### validate the account and password
    connectStr = Application("shs1sql_ConnectionString")
    dbConn.Open connectStr
    			  
    spHC_adminLoginValidate.CommandText = "spHC_adminLoginValidate"             
    spHC_adminLoginValidate.CommandType = 4
    spHC_adminLoginValidate.CommandTimeout = 30
    spHC_adminLoginValidate.ActiveConnection = dbConn
    spHC_adminLoginValidate.Parameters.Append spHC_adminLoginValidate.CreateParameter("RETURN_VALUE" ,3 ,&H0004)
    spHC_adminLoginValidate.Parameters.Append spHC_adminLoginValidate.CreateParameter("@account",adVarChar,&H0001,50,erpAccount)  
    spHC_adminLoginValidate.Parameters.Append spHC_adminLoginValidate.CreateParameter("@password",adVarChar,&H0001,50,erpPassword)

  • #7
    New Coder
    Join Date
    Dec 2005
    Location
    Texas
    Posts
    60
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Do you think it could be the server or IIS thats not allowing the asp script to run? Reason I ask is because I installed the template on another Windows Server 2003, IIS6, SQL Express, and it works fine with the codes it already has. But on this server it doesn't.

    I tried to match up the setting with both servers and all seems to look the same. cant figure what could be wrong.

  • #8
    New Coder
    Join Date
    Dec 2005
    Location
    Texas
    Posts
    60
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Attached is the two files in question.
    Attached Files Attached Files

  • #9
    Regular Coder
    Join Date
    Mar 2007
    Posts
    505
    Thanks
    1
    Thanked 19 Times in 19 Posts
    That could very well be the issue.

    In IIS, RIGHT CLICK your site in question and click on PROPERTIES. Then, under the HOME DIRECTORY, make sure you have READ and WRITE both checked.

    Make sure that the EXECUTE PERMISSIONS is SCRIPT ONLY, and lastly, make sure that your IUSR has READ permissions on your www directory.
    To say my fate is not tied to your fate is like saying, 'Your end of the boat is sinking.' -- Hugh Downs
    Please, if you found my post helpful, pay it forward. Go and help someone else today.

  • #10
    New Coder
    Join Date
    Dec 2005
    Location
    Texas
    Posts
    60
    Thanks
    2
    Thanked 0 Times in 0 Posts
    yup,
    I checked the IIS and all permissions are as they should be for the directory.
    is their a template I could use to test the SQL connection string?

    I would like to somehow test the connection string in an ASP login or somthing, just to see if its the string or somthing with the IIS server running an ASP script.

  • #11
    Regular Coder
    Join Date
    Mar 2007
    Posts
    505
    Thanks
    1
    Thanked 19 Times in 19 Posts
    Sorry I didn't catch this before, but your connection string should never reside in the global.asa. That's a security risk.

    We will deal with that later...

    Try this:

    Create an new page called test.asp.

    Code:
    <%
    
    Dim Conn
    '
    Set Conn = Server.CreateObject("ADODB.Connection")
    Conn.Open "Provider=SQLOLEDB;Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;"
    '
    If Conn.State = 1 then 
      response.write(" You connected successfully ")
    else
      response.write(" Something went wrong ")
    end if
    '
    Conn.Close
    Set Conn = nothing
    %>
    In the connection string, replace your 'myDatabase', 'mypassword', 'myusername', and 'myServerAddress' with the actual values that you know work.

    If you still cannot connect there, then we have larger issues at hand.
    To say my fate is not tied to your fate is like saying, 'Your end of the boat is sinking.' -- Hugh Downs
    Please, if you found my post helpful, pay it forward. Go and help someone else today.

  • #12
    New Coder
    Join Date
    Dec 2005
    Location
    Texas
    Posts
    60
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Yes, the code you gave me worked..

    "You connected successfully "

  • #13
    Regular Coder
    Join Date
    Mar 2007
    Posts
    505
    Thanks
    1
    Thanked 19 Times in 19 Posts
    OK. So what that tells us is that you can create objects on your server and that you can connect to your database.

    Looking at your Global.Asa file that you attached, line 26, did you replace the default values there with your values that you know work?

    Code:
    Application("shs1sql_ConnectionString") = "PROVIDER=SQLOLEDB;Database=yourDatabaseName;SERVER=your.sqlserver.com;PASSWORD=yourPassword;UID=yourUserID;User Id=yourUserID;"
    If so, try removing the 'User Id=yourUserID;' part of the connection string.
    To say my fate is not tied to your fate is like saying, 'Your end of the boat is sinking.' -- Hugh Downs
    Please, if you found my post helpful, pay it forward. Go and help someone else today.

  • #14
    New Coder
    Join Date
    Dec 2005
    Location
    Texas
    Posts
    60
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Yes, on the server I have all the correct connection information in my Global.asa file.

  • #15
    Regular Coder
    Join Date
    Mar 2007
    Posts
    505
    Thanks
    1
    Thanked 19 Times in 19 Posts
    Did you remove the 'User Id=yourUserId;' part from the connection string?
    To say my fate is not tied to your fate is like saying, 'Your end of the boat is sinking.' -- Hugh Downs
    Please, if you found my post helpful, pay it forward. Go and help someone else today.


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •