Guest_imported
New member
- Jan 1, 1970
- 0
<%
dim query, con
Set Con = Server.CreateObject( "ADODB.Connection" )
Con.Open( "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" _& Server.MapPath( "database/Krapp.mdb" ) )
set filesy = createobject("scripting.filesystemobject"
set txtfile = filesy.Opentextfile("I:/webalizer/" & name _& "/webalizer.hist",1, 0)
Do
line = txtfile.Readline
query = "INSERT INTO Dateandusagestatistics_(Month,Year,pagesviewed,Filesviewed,Sitesfrom,Data,_
Unknown1,Unknown2,Hits,Uniquevisits)" & " Values_
(" & replace(line," ","," & ""
con.execute(query)
if viewresults="y" then %>
<% Responce.write %><% =query %><br>
<% end if %>
<% '--------------------------DISPLAY RESULTS------------ %>
<% 'if viewresults="y" or viewresults="Y" then %>
<% '=line %>
<BR>
<% 'end if %>
<% '----------------END DISPLAY RESULTS------------------ %>
<% line="" %>
<%
Loop until txtfile.atEndofstream
txtfile.close
con.close
set con = nothing
%>
__________________________________________________________
the above code takes the file record (the actual record is below)
8 2001 7322 0 96 16866 11 31 7322 632
and translates each number into a variable and value, placing them into the database table Dateandusagestatistics.
or at least its supposed to
whenever i run the script the following error appears
******************************************
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
/test.asp, line 81
******************************************
any help would be appreciated
thanks
dim query, con
Set Con = Server.CreateObject( "ADODB.Connection" )
Con.Open( "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" _& Server.MapPath( "database/Krapp.mdb" ) )
set filesy = createobject("scripting.filesystemobject"
set txtfile = filesy.Opentextfile("I:/webalizer/" & name _& "/webalizer.hist",1, 0)
Do
line = txtfile.Readline
query = "INSERT INTO Dateandusagestatistics_(Month,Year,pagesviewed,Filesviewed,Sitesfrom,Data,_
Unknown1,Unknown2,Hits,Uniquevisits)" & " Values_
(" & replace(line," ","," & ""
con.execute(query)
if viewresults="y" then %>
<% Responce.write %><% =query %><br>
<% end if %>
<% '--------------------------DISPLAY RESULTS------------ %>
<% 'if viewresults="y" or viewresults="Y" then %>
<% '=line %>
<BR>
<% 'end if %>
<% '----------------END DISPLAY RESULTS------------------ %>
<% line="" %>
<%
Loop until txtfile.atEndofstream
txtfile.close
con.close
set con = nothing
%>
__________________________________________________________
the above code takes the file record (the actual record is below)
8 2001 7322 0 96 16866 11 31 7322 632
and translates each number into a variable and value, placing them into the database table Dateandusagestatistics.
or at least its supposed to
whenever i run the script the following error appears
******************************************
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
/test.asp, line 81
******************************************
any help would be appreciated
thanks