80004005 error bij asp hekp

Pagina: 1
Acties:
  • 94 views sinds 30-01-2008

  • kruznik
  • Registratie: Juli 2005
  • Laatst online: 08-06-2025
Ik krijg nu telkens volgende error terwijl ik dit voordien niet had.
Wie helpt mij?
Mijn rechten staan juist vermoed ik aangezien het vroeger werkte en ik niks verandert heb.
Wat gebruik ik? Win Server2003, IIS6
Ik ben een asp leek en vraag daarom jullie hulp (Blog van webwizguide)

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access Driver] Could not use '(unknown)'; file already in use.

/verschoore/journal/common.asp, line 120

Hier nu de asp pagina die ik wil openen en vervolgens de common.asp.

default.asp

<%
Dim rsJournal 'Database recordset holding the Journal items
Dim rsCommentsCount 'Database recordset holding the count of comments for each Journal item
Dim intRecordPositionPageNum 'Holds the number of the page the user is on
Dim intRecordLoopCounter 'Loop counter to loop through each record in the recordset
Dim intTotalNumJournalEntries 'Holds the number of Journal Items there are in the database
Dim intTotalNumJournalPages 'Holds the number of pages the Journal Items cover
Dim intLinkPageNum 'Holds the number of the other pages of Journal itmes to link to


'If this is the first time the page is displayed then set the record position is set to page 1
If Request.QueryString("PagePosition") = "" Then
intRecordPositionPageNum = 1

'Else the page has been displayed before so the Journal item record postion is set to the Record Position number
Else
intRecordPositionPageNum = CInt(Request.QueryString("PagePosition"))
End If
%>
<html>
<head>
<title>Jef Verschoore</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.style1 {
font-family: Arial, Helvetica, sans-serif;
color: #FFFFFF;
font-size: 24px;
}
.style2 {color: #FFFFFF}
.style4 {font-family: Arial, Helvetica, sans-serif}
-->
</style></head>

<body bgcolor="#333333" text="#CCCCCC" onLoad="MM_preloadImages('menubar/mb_r2_c3_f2.gif','menubar/mb_r2_c5_f2.gif','menubar/mb_r2_c7_f2.gif','menubar/mb_r2_c9_f2.gif','menubar/mb_r2_c11_f2.gif','menubar/mb_r2_c13_f2.gif','menubar/mb_r2_c15_f2.gif','menubar/mb_r2_c17_f2.gif');" leftmargin="8" topmargin="8" marginwidth="8" marginheight="8">
<p> </p>
<table cellpadding="1" bgcolor="#FFFFFF" cellspacing="0" border="0" align="center" width="730">

<tr>
<td><table cellpadding="0" bgcolor="#000000" cellspacing="0" width="728" border="0">
<tr>
<td height="27" align="center" valign="middle" class="bodytext10"><strong><span class="style1">Jef Verschoore </span></strong></td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor="#333333">[img]"img/transparent.gif"[/img]</td>
</tr>
<tr>
<td><table cellpadding="0" bgcolor="#000000" cellspacing="0" width="728" border="0">
<tr>
<td height="27" align="center" valign="middle" class="bodytext10 style2 style4"><a href="../Portfolio.htm">Portfolio & CV</a> | <a href="../Politiek.htm">Politiek</a> | <a href="../Programma.htm">Programma</a> | <a href="../Realisaties.htm">Realisaties</a> | <a href="../Senioren.htm">Senioren</a> | <a href="default.asp">Artikels</a> | <a href="../kalender/calendar.asp">Kalender</a> | <a href="../Fotos.htm">Foto's</a> | <a href="../Links.htm">Links</a> | <a href="../Contacteer.htm">Contact</a></td>
</tr>
</table></td>
</tr>
<tr>
<td bgcolor="#333333">[img]"img/transparent.gif"[/img]</td>
</tr>
</table>
<table cellpadding="1" bgcolor="#CCCCCC" cellspacing="0" border="0" align="center" width="730">
<tr>
<td><table cellpadding="0" bgcolor="#000000" cellspacing="0" width="728" border="0">
<tr>
<td><table width="715" cellspacing="0" cellpadding="0" bgcolor="#000000" border="0" align="left">
<tr valign="top">
<td width="165"><div align="center">
<p> </p>
<p>[img]"../fotos/pict.jpg"[/img]</p>
</div></td>
<td width="550"><p></p>
<p class="bodytext"><span class="style4">Artikels</span><br>
</p>
<div align="left">
<%
'Create recorset object
Set rsJournal = Server.CreateObject("ADODB.Recordset")

'Initalise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT tblJournal.* FROM tblJournal ORDER BY Date_stamp DESC;"

'Set the cursor type property of the record set to dynamic so we can naviagate through the record set
rsJournal.CursorType = 3

'Query the database
rsJournal.Open strSQL, adoCon

'Set the number of records to display on each page by the constant set in the common.asp file
rsJournal.PageSize = intRecordsPerPage

'Get the record poistion to display from
If NOT rsJournal.EOF Then rsJournal.AbsolutePage = intRecordPositionPageNum


'Create recorset object
Set rsCommentsCount = Server.CreateObject("ADODB.Recordset")


'If there are no rcords in the database display an error message
If rsJournal.EOF Then
'Tell the user there are no records to show
Response.Write "<span class=""text""><br>There are no Journal Items to read"
Response.Write "<br>Please check back later</span>"
Response.End


'Display the Journal Items
Else

'Count the number of Journal Items database
intTotalNumJournalEntries = rsJournal.RecordCount

'Count the number of pages of Journal Items there are in the database calculated by the PageSize attribute set above
intTotalNumJournalPages = rsJournal.PageCount


'Display the HTML number number the total number of pages and total number of records
%>
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td align="center" class="text">  </td>
</tr>
</table>
<br>
<%

'For....Next Loop to display the Journal Items in the database
For intRecordLoopCounter = 1 to intRecordsPerPage

'If there are no records then exit for loop
If rsJournal.EOF Then Exit For

'Get the count of comments from the db
strSQL = "SELECT Count(tblComments.Journal_ID) AS CountOfJournalItems "
strSQL = strSQL & "FROM tblComments "
strSQL = strSQL & "WHERE tblComments.Journal_ID = " & CLng(rsJournal("Journal_ID")) & ";"

'Query the database
rsCommentsCount.Open strSQL, adoCon

%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="<% = strTableBorderColour %>">
<tr>
<td>
<table width="100%" border="1" cellpadding="3" cellspacing="1" bordercolor="#FFFFFF">
<tr>
<td bgcolor="#333333" class="heading"><% = rsJournal("Journal_title") %></td>
</tr>
<tr>
<td bgcolor="#000000" class="text">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="text"><% = rsJournal("Journal_item") %>
</td>
</tr>
<tr>
<td align="right" class="smText" height="20">Gepost door
<%

'If there is an email address entered make it a mailto link
If rsJournal("Author_email") <> "" Then Response.Write("<a href=""mailto:" & rsJournal("Author_email") & """ style=""font-size: " & intSmallTextSize & "px;"">" & rsJournal("Author") & "</a>") Else Response.Write(rsJournal("Author"))

%>
op
<% = FormatDateTime(rsJournal("Date_stamp"), vbLongDate) %>
tijdens
<% = FormatDateTime(rsJournal("Date_stamp"), vbShortTime) %>
<%

'If commets are allowed for this itm show a links to the comments page
If CBool(rsJournal("Comments")) = True Then

%>
<a href="journal_comments.asp?JournalID=<% = rsJournal("Journal_ID") %>&PagePosition=<% = intRecordPositionPageNum %>" target="_self" style="font-size: <% = intSmallTextSize %>px">Kommentaar</a>
<%

If NOT rsCommentsCount.EOF Then
Response.Write "(" & rsCommentsCount("CountOfJournalItems") & ")"
Else
Response.Write "(0)"
End If
End If
%> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<br>
<%
'Close the count recordset
rsCommentsCount.Close

'Move to the next record in the recordset
rsJournal.MoveNext
Next
End If

'Display an HTML table with links to the other Journal Items
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="50%" align="center" class="text">
<%
'If there are more pages to display then add a title to the other pages
If intRecordPositionPageNum > 1 or NOT rsJournal.EOF Then
Response.Write vbCrLf & " Page: "
End If

'If the Journal Items page number is higher than page 1 then display a back link
If intRecordPositionPageNum > 1 Then
Response.Write vbCrLf & " <a href=""default.asp?PagePosition=" & intRecordPositionPageNum - 1 & """ target=""_self""><< Prev</a> "
End If


'If there are more pages to display then display links to all the pages
If intRecordPositionPageNum > 1 or NOT rsJournal.EOF Then

'Display a link for each page in the Journal Items
For intLinkPageNum = 1 to intTotalNumJournalPages

'If the page to be linked to is the page displayed then don't make it a hyper-link
If intLinkPageNum = intRecordPositionPageNum Then
Response.Write vbCrLf & " " & intLinkPageNum
Else

Response.Write vbCrLf & " <a href=""default.asp?PagePosition=" & intLinkPageNum & """ target=""_self"">" & intLinkPageNum & "</a> "
End If
Next
End If


'If it is Not the End of the Journal Items entries then display a next link for the next Journal Items page
If NOT rsJournal.EOF then
Response.Write vbCrLf & " <a href=""default.asp?PagePosition=" & intRecordPositionPageNum + 1 & """ target=""_self"">Next >></a>"
End If


'Finsh HTML the table
%>
</td>
</tr>
</table></td>
</tr>
</table>
<br>
<br>
<%

'Reset server objects
rsJournal.Close
Set rsJournal = Nothing
Set rsCommentsCount = Nothing
Set strCon = Nothing
Set adoCon = Nothing
%>
<div align="center"> </div></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<table cellpadding="1" bgcolor="#FFFFFF" cellspacing="0" border="0" align="center" width="730">
<tr>
<td bgcolor="#333333">[img]"img/transparent.gif"[/img]</td>
</tr>
<tr>
<td><table cellpadding="0" bgcolor="#000000" cellspacing="0" width="728" border="0">
<tr>
<td height="27" align="center" valign="middle" class="bodytext10 style2 style4"><a href="../Portfolio.htm">Portfolio & CV</a> | <a href="../Politiek.htm">Politiek</a> | <a href="../Programma.htm">Programma</a> | <a href="../Realisaties.htm">Realisaties</a> | <a href="../Senioren.htm">Senioren</a> | <a href="default.asp">Artikels</a> | <a href="../kalender/calendar.asp">Kalender</a> | <a href="../Fotos.htm">Foto's</a> | <a href="../Links.htm">Links</a> | <a href="../Contacteer.htm">Contact</a></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>


common.asp

<%
Dim adoCon 'Database Connection Variable
Dim rsConfiguration 'Holds the configuartion recordset
Dim strCon 'Holds the Database driver and the path and name of the database
Dim strSQL 'Holds the SQL query for the database
Dim intRecordsPerPage 'Holds the number of files shown on each page
Dim strBgColour 'Holds the background colour of the Journal
Dim strTextColour 'Holds the text colour of the Journal
Dim strTextType 'Holds the font type of the Journal
Dim intHeadingTextSize 'Holds the heading font size
Dim intTextSize 'Holds the font size of the Journal
Dim intSmallTextSize 'Holds the small font size
Dim strLinkColour 'Holds the link colour of the Journal
Dim strTableColour 'Holds the table colour
Dim strTableBorderColour 'Holds the table border colour
Dim strTableTitleColour 'Holds the table title colour
Dim strVisitedLinkColour 'Holds the visited link colour of the Journal
Dim strActiveLinkColour 'Holds the active link colour of the Journal
Dim blnLCode 'set to true
Dim blnEmail 'Boolean set to true if e-mail is on
Dim strCode 'Holds the page code
Dim strCodeField 'Holds the code type
Dim strWebSiteEmailAddress 'Holds the e-mail address for the web site the Site Journal is on
Dim strMailComponent 'Email coponent the site Journal app useses
Dim strSMTPServer 'SMTP server for sending the e-mails through
Dim strLoggedInUserCode 'Holds the user code of the user
Dim strTitleImage 'Holds the path and name for the title image for the site Journal
Dim intMsgCharNo 'Holds the number of characters allowed for the messages
Dim blnCookieSet 'Set to true if cookies are to be set to stop multiple posts
Dim blnIPBlocking 'Set to true if IP blooking is to be used to stop multiple posts


'Create database connection

'Create a connection odject
Set adoCon = Server.CreateObject("ADODB.Connection")

'------------- If you are having problems with the script then try using a diffrent driver or DSN by editing the lines below --------------

'Database connection info and driver
strCon = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("journal.mdb")

'Database driver info for Brinkster
'strCon = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("/USERNAME/db/site_journal.mdb") 'This one is for Brinkster users place your Brinster username where you see USERNAME

'Alternative OLE drivers faster than the basic one above
'strCon = "Provider=Microsoft.Jet.OLEDB.3.51; Data Source=" & Server.MapPath("site_journal.mdb") 'This one is if you convert the database to Access 97
'strCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("site_journal.mdb") 'This one is for Access 2000/2002

'If you wish to use DSN then comment out the driver above and uncomment the line below (DSN is slower than the above drivers)
'strCon = "DSN = DSN_NAME" 'Place the DSN where you see DSN_NAME

'---------------------------------------------------------------------------------------------------------------------------------------------

'Set an active connection to the Connection object
adoCon.Open strCon

'Set up the page encoding
strCodeField = "Code"
strCode = "nolinks2002"

'Read in the configuration for the script
'Intialise the ADO recordset object
Set rsConfiguration = Server.CreateObject("ADODB.Recordset")

'Initialise the SQL variable with an SQL statement to get the configuration details from the database
strSQL = "SELECT tblConfiguration.* From tblConfiguration;"

'Query the database
rsConfiguration.Open strSQL, strCon

'If there is config deatils in the recordset then read them in
If NOT rsConfiguration.EOF Then

'Read in the configuration details from the recordset
intRecordsPerPage = CInt(rsConfiguration("No_records_per_page"))
strBgColour = rsConfiguration("bg_colour")
strTextColour = rsConfiguration("text_colour")
strTextType = rsConfiguration("text_type")
intHeadingTextSize = CInt(rsConfiguration("heading_text_size"))
intTextSize = CInt(rsConfiguration("text_size"))
intSmallTextSize = CInt(rsConfiguration("small_text_size"))
strTableColour = rsConfiguration("table_colour")
strTableBorderColour = rsConfiguration("table_border_colour")
strTableTitleColour = rsConfiguration("table_title_colour")
strLinkColour = rsConfiguration("links_colour")
strVisitedLinkColour = rsConfiguration("visited_links_colour")
strActiveLinkColour = rsConfiguration("active_links_colour")
strWebSiteEmailAddress = rsConfiguration("email_address")
blnLCode = CBool(rsConfiguration("Code"))
blnEmail = CBool(rsConfiguration("email_notify"))
strTitleImage = rsConfiguration("Title_image")
intMsgCharNo = rsConfiguration("Message_char_no")
blnCookieSet = CBool(rsConfiguration("Cookie"))
blnIPBlocking = CBool(rsConfiguration("IP_blocking"))
strMailComponent = rsConfiguration("mail_component")
strSMTPServer = rsConfiguration("mail_server")
End If

'Reset server object
rsConfiguration.Close
Set rsConfiguration = Nothing
%>

Indien je ook iets bent met de database, mail me
dieter.liefhooghe@pandora.be

Met vriendelijke groeten
Dieter en alvast bedankt

  • The Eagle
  • Registratie: Januari 2002
  • Laatst online: 01:09

The Eagle

I wear my sunglasses at night

Dude...anders post je ff een hele lap code en vraag je ons ff te debuggen ofzo :|
Lees aub Welkom in P&W: FAQ en Beleid *updated: 20 mei* ff ofzo...
Mailen doen we hier niet (dat is juist de kracht van het forum ;)
En groeten hoeft niet, maar dat had je ook in Algemene gedragsregels (Netiquette) kunnen lezen :)

Al is het nieuws nog zo slecht, het wordt leuker als je het op zijn Brabants zegt :)


  • NMe
  • Registratie: Februari 2004
  • Laatst online: 15-04 22:07

NMe

Quia Ego Sic Dico.

The_Eagle: of je nou gelijk hebt of niet, laat het modden maar aan moderators over. :)

@kroznik: sorry hoor, maar hier gaan we niet aan beginnen. Het is niet de bedoeling dat je hier een lap code van een paar honderd regels post, in de hoop dat wij het dan voor je gaan debuggen. Debuggen mag je zelf doen, zie voor meer tips ook P&W FAQ - Leer **** debuggen!!. Bekijk verder ook de linkjes die The_Eagle geeft maar even, want die ken je, gezien je topicstart, nog niet.

Overigens, àls je code post, post dan alleen het relevante stukje, en doe dat dan tussen code tags, dat bevordert de leesbaarheid.

Sowieso geven we hier in Programming & Webscripting geen support op scripts van anderen. Als je problemen hebt met iemand ander's code, vraag dan support bij de makers, niet aan ons. Ook wil het in Google stoppen van de foutmelding nog wel eens uitkomst bieden. ;)

Hoe dan ook, dit topic hoort dus om meerdere redenen niet in Programming & Webscripting en niet op de rest van GoT thuis, en om die reden doe ik het dicht. :)

'E's fighting in there!' he stuttered, grabbing the captain's arm.
'All by himself?' said the captain.
'No, with everyone!' shouted Nobby, hopping from one foot to the other.


Dit topic is gesloten.