Under normal circumstances, asp can run normally, but as long as it connects to the database, it prompts, Microsoft JET Database Engine error '80004005'
My computer cannot run because I use batch processing to clean files.
1. Check the database connection statement and no errors are found;
2. The permission to view the folder has been given to everyone;
3. When the database is opened, the system will create temporary files in the temporary folder %SystemRoot%/temp/, and %
SystemRoot%/temp/ does not have sufficient permissions
Solution: Add the permissions of %SystemRoot%/temp/ (read and write IUSER_computer name)
2. If there is a general unspecified error, there is another way. First
In fact, it only takes a few simple steps. :
start. . . run. . . regsvr32 jscript.dll
start. . . run. . . regsvr32 vbscript.dll
start. . . run. . . iisreset
Microsoft JET Database Engine (0x80004005) unspecified error resolution
1. The system may not register msjetoledb40.dll. The solution is
Click Start --->Run, enter regsvr32 msjetoledb40.dll, and press Enter;
2. Permissions of the folder where the database is located
The way to open it is: open My Computer, then click "Folder Options" on the menu ---> View, and then change "Use Simple Files"
Remove the hook in front of "Folder Sharing (recommended)" and click "Confirm"; then return to the folder that requires permission to open (Data Inventory
folder), right-click--->Properties--->Security, then click "Add"--->"Advanced"--->Find Now--->Then below
Select "everyone"--->OK--->Click the "everyone" you just added, and then edit everyone in the big box below
The permissions are Full Control, just save.
3. Need to open the guest user
How to open: My Computer--->Control Panel--->Administrative Tools---->Computer Management--->Local Users and Groups---Users---
Find "guest", double-click it, then uncheck the "Account has been deactivated" on the pop-up page, and save it.
4. Temp (temporary folder) permissions
Open method: windows--->temp, right-click and select-Properties, you will see an option called "Security", add
Add everyone, set the permissions to full control, and then set the user you are using windows to full control. (Folder permissions
limit
The way to open it is: open My Computer, then click "Folder Options" ---> View on the menu, and then change "Use Simple Files"
Remove the hook in front of "Folder Sharing (recommended)" and click "Confirm"; then return to the folder that requires permission to open (Data Inventory
folder), right-click--->Properties--->Security, then click "Add"--->"Advanced"--->Find Now--->Then below
Select "everyone"--->OK--->Click the "everyone" you just added, and then edit everyone in the big box below
The permissions are Full Control, just save.
I want to use ASP to batch import excel data into a sql database. I borrowed the code from zhanghongwen (rogue mosquito), as follows
:
...
...
...
<%
server.scripttimeout=100000000
sub dataIntoSqlServer_ceritificate(strFileName,strSheetName,myConn)
'definition
dim myConnection
dim strName
dim rsXsl,rsSql
dim str_Xsl,str_Sql
dim myConn_Xsl
dim cmd
dimi,j
dim maxId
strName=strFileName
set myConnection=server.createobject("adodb.connection")
set rsXsl=Server.Createobject("ADODB.Recordset")
set rsSql=Server.CreateObject("ADODB.Recordset")
set cmd=Server.CreateObject("ADODB.Command")
cmd.ActiveConnection=myConn
myConn_Xsl="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strName
& ";Extended Properties=Excel 8.0"
'Open the connection
myConnection.open myConn_Xsl
'Open table
str_Xsl="select * from ["& strSheetName &"$]"
rsXsl.open str_Xsl,myConnection,1,1
j=1
Do While not rsXsl.eof
'Get the maximum value
str_Sql="select Max(id) as maxId from fubiao"
rsSql.open str_Sql,myConn,1,3
If Not rsSql.Eof Then
If not isNull(rsSql("maxId")) Then
maxId=Clng(rsSql("maxId"))+1
Else
maxId=1
End if
else
maxId=1
End if
rsSql.close'//Close the object
'Join database
str_Sql="insert into fubiao values("&maxId&",'"&rsXsl(1)&"','"&rsXsl(3)
&"','"&rsXsl(4)&"','"&rsXsl(5)&"','"&rsXsl(6)&"','"&rsXsl(7)&"','"&rsXsl(8)
&"','"&rsXsl(9)&"','"&rsXsl(10)&"','"&rsXsl(11)&"','"&rsXsl(12)&"','"&rsXsl(13)
&"','"&rsXsl(14)&"','"&rsXsl(15)&"','"&rsXsl(16)&"','"&rsXsl(17)&"','"&rsXsl(18)
&"','"&rsXsl(19)&"','"&rsXsl(20)&"','"&rsXsl(21)&"','"&rsXsl(22)&"','"&rsXsl(23)
&"','"&rsXsl(24)&"','"&rsXsl(25)&"','"&rsXsl(26)&"','"&rsXsl(27)&"')"
cmd.CommandText=str_Sql
cmd.Execute()
'''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''
'''
j=j+1
rsXsl.movenext
Loop
response.write "A total of <font color='red'>" & j-1 & "</font> records were imported
.<br/>"
response.write "<a href=javascript:history.back()>OK</a>"
set rsXsl=nothing
set rsSql=nothing
set myconnection=nothing
set cmd=nothing
end sub
...
...
...
file1=request.form("filename2")
strtj=mid(request.form("filename2"),instrrev(file1,"/")+1,(instrrev(file1,".")-
instrrev(file1,"/")-1))
if file1="" then
response.write "Please select the Excel table you want to import!<p></p>"
%>
<a href=javascript:history.back()>Previous page</a>
<%
response.end
end if
myconn="DRIVER={SQL SERVER};SERVER=(local);uid=sa;pwd=sa;DATABASE=qjgsj_data"
call dataIntoSqlServer_ceritificate file1,""&strtj&"",myconn
...
...
%>
When opening a connection:
myConnection.open myConn_Xsl
Appears: HTTP 500.100_Internal Server Error_ASP Error
Error type:
Microsoft Jet Database Engine(0x80004005)
/../../aa.asp line xx
What's the problem?
Is there something wrong with this conjunction?
myConn_Xsl="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strName &
";Extended Properties=Excel 8.0"
The DSN of my server system has established a data source for the SQL database. I use ASP to import EXCEL data in batches. I still need to provide the data in the system DSN.
EXCEL settings driver?
Is zhanghongwen (rogue mosquito) here? Question points: 80, number of replies: 4Top
1st floor VeryOldMan (headless fly ()) replied on 2006-01-27 14:53:46 Score
80myConn_Xsl="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath
("/yourexcel.xls") _
& ";Extended Properties=""Excel 8.0;HDR=Yes;"";"
SQL Command: "Select * From [yourSheetname$]"
Test passed on my own website: Top
Floor 2 zcxc (Zhichun Xiaocao) replied on 2006-02-05 14:18:59 with a score of 0. Still not working.
Does Microsoft.Jet.OLEDB.4.0 need to be configured on the server? Top
Floor 3 zcxc (Zhichun Xiaocao) replied on 2006-02-05 18:36:27 Score 0 Depressed! ! !
Please help! ! !
My server configuration is windows server 2000, iis 5.0, sql server 2000.
Use myConn_Xsl="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strName &
";Extended Properties=Excel 8.0"
or myConn_Xsl="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath
("strName ") _
& ";Extended Properties=""Excel 8.0;HDR=Yes;"";" statement
An error occurred while opening the connection:
Microsoft Jet Database Engine(0x80004005)
/../../aa.asp line xx
Use myconn_Xsl="driver={microsoft excel driver(*.xls)};dbq="&server.mappath
("strName")
When opening the connection, an error occurs:
microsoft ole db provider for odbc drivers(0x80004005)
/../../aa.asp line xx
Excuse me:
Use myconn_Xsl="driver={microsoft excel driver(*.xls)};dbq="&server.mappath
("strName") statement to connect, how should the server be configured?
Use myConn_Xsl="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strName &
";Extended Properties=Excel 8.0"
or myConn_Xsl="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath
("strName ") _
& ";Extended Properties=""Excel 8.0;HDR=Yes;"";"
To connect, how should the server be configured?
What is the reason for the above problem? Is the server missing some configuration or something else?
Please give some expert guidance.
When using Dreamweaver to connect to the database, the error usually occurs on line 8. And there are problems sometimes and not at other times. Usually it starts running normally, but as soon as it is refreshed, the following problems will occur:
HTTP Error 500.100 - Internal Server Error - ASP Error
Internet Information Services
-------------------------------------------------- ----------------------------------
Technical information (for support staff)
Error type:
Provider (0x80004005)
unspecified error
/xxxxxx.asp, line 8
Browser type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Web page:
GET /main.asp
Cause of the problem:
It is caused by irregularities in the code for connecting to the database. There are gaps in the code.
Solution:
Find the statement that generates the code that connects to the database and pays for MM_XXXXXX_STRING, and adds UID=;PWD=
(This code is usually under the CONNECTIONS file of the site)
For example:
Before error: MM_XXXXX_STRING = "dsn=YYYY;"
After correction: MM_XXXX_STRING = "dsn=YYYY;UID=;PWD=;"
Try it now for yourself!