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.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Mar 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Database Error, Help in the .asp file

    Hi, i'm helping a friend to setup his website he does online sales, so when I tried to go to the store it send me this message:

    Microsoft OLE DB Provider for ODBC Drivers error '80004005'

    [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

    D:\HOSTING\CEXSAR\SECURE\../includes/databaseFunctions.asp, line 18

    And this is my databaseFuntions.asp (the 18th line is in red) file does anybody knows what could be wrong here:

    <%
    ' Comersus Sophisticated Cart
    ' Comersus Open Technologies
    ' USA - 2005
    ' Open Source License can be found at documentation/readme.txt
    ' http://www.comersus.com
    ' Details: functions to open and close db connection using dsn less string
    %>
    <!--#include file="../includes/adovbs.inc"-->
    <%

    sub openDb()
    if varType(connTemp)=0 or varType(connTemp)=1 then

    ' create the connection
    set connTemp = server.createObject("adodb.connection")

    connTemp.Open pDatabaseConnectionString

    if err.number <> 0 then
    response.redirect "comersus_supportError.asp?error="&Server.Urlencode("Error while opening DB read:"&Err.Description& "<br><br><b>Common solutions</b><br><br>1. Check that you haven't change default database path and name <br>2. Check that your web server has Access 97 or 2000 ODBC installed <br>3. Check that you have read, modify and delete permissions over database folder and database file <br>4. Open your database with Access program and select Repair Database option <br>5. Select other connection method like other connection string or DSN")
    end if

    end if
    end sub

    sub getFromDatabase(mySQL, rsTemp, scriptName)

    call openDb()

    set rsTemp = server.createObject("adodb.recordset")

    ' set locktype
    rsTemp.lockType = adLockReadOnly

    ' set the cursor
    rsTemp.cursorType = adOpenForwardOnly

    rsTemp.open mySQL, connTemp

    if err.number <> 0 then
    response.redirect "comersus_supportError.asp?error="&Server.Urlencode("Error in " &scriptName& ", error: "&Err.Description& " - Err.Number:"&Err.number&" - SQL:"&mySQL)
    end if

    end sub

    sub getFromDatabasePerPage(mySQL, rsTemp, scriptName)

    call openDb()

    set rsTemp = server.createObject("adodb.recordset")

    rsTemp.cursorLocation = adUseClient
    rsTemp.cacheSize = pNumPerPage

    rsTemp.open mySQL, connTemp

    if err.number <> 0 then
    response.redirect "comersus_supportError.asp?error="&Server.Urlencode("Error in " &scriptName& ", error: "&Err.Description& " - Err.Number:"&Err.number&" - SQL:"&mySQL)
    end if

    end sub

    sub getFromDatabaseSeek(mySQL, rsTemp, scriptName)

    call openDb()

    set rsTemp = server.createObject("adodb.recordset")
    rsTemp.cursorType = 3
    rsTemp.lockType = 3

    rsTemp.Open mySQL, connTemp

    if err.number <> 0 then
    response.redirect "comersus_supportError.asp?error="&Server.Urlencode("Error in " &scriptName& ", error: "&Err.Description& " - Err.Number:"&Err.number&" - SQL:"&mySQL)
    end if

    end sub

    sub updateDatabase(mySQL, rsTemp, scriptName)

    call openDb()

    set rsTemp=connTemp.execute(mySQL)

    if err.number <> 0 then
    response.redirect "comersus_supportError.asp?error="&Server.Urlencode("Update Error in " &scriptName& ", error: "&Err.Description& " - Err.Number:"&Err.number&" - SQL:"&mySQL)
    end if

    end sub


    function closeDB()
    on error resume next

    rsTemp.close
    set rsTemp = nothing
    connTemp.close
    set connTemp = nothing

    end function

    %>

    If anyone could help me I'll appreciate.

    Thanks in advance.
    Last edited by cexsar; 03-28-2007 at 08:25 PM.

  • #2
    Regular Coder
    Join Date
    Jan 2005
    Posts
    155
    Thanks
    0
    Thanked 0 Times in 0 Posts
    what is pDatabaseConnectionString?

  • #3
    SSJ
    SSJ is offline
    Regular Coder
    Join Date
    Mar 2007
    Posts
    230
    Thanks
    0
    Thanked 4 Times in 4 Posts
    Try to response.write pDatabaseConnectionString and let me know what it is...


  •  

    Posting Permissions

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