Hello, I am trying to convert and ASP page to ASP.NET on Windows 2008 R2. The program I converted previously read in data from multiple Microsoft Access databases, looping through each directory under a directory called "pub". The data in the tables is created from a software package called eMill, which sends emails in batches. The ASP page provides totals on how many emails were sent out for each letter type for that day. We are upgrading our eMill application and the new version of the software writes to SQLite databases instead of Microsoft Access db's. I have installed .NET 4.0 (dotNetFx40_Full_x86_x64.exe) on the new server, as well as System.Data.SQLite for .NET 4.0 (sqlite-netFx40-setup-bundle-x64-2010-1.0.81.0.exe), and the program is getting an error "Provider cannot be found. It may not be properly installed" when trying to open the SQLite databases. The only differences in this program from one that works with Microsoft Access is the provider name ("System.Data.SQLite instead of "Microsoft.Jet.OLEDB.4.0") and the database names (store.db3 instead of Messages.mdb).
Here is a portion of the code, the complete aspx file is attached as txt: --------------------------------------------------------------------------------------- <% dim rs,x, conn, dir conn=Server.CreateObject("ADODB.Connection") 'conn.provider="Microsoft.Jet.OLEDB.4.0" conn.provider="System.Data.SQLite" conn.Mode = 1 'conn.open(server.mappath("..\pub\" & folder.name & "\Messages.mdb")) conn.open(server.mappath("..\pub\" & folder.name & "\store.db3")) rs=Server.CreateObject("ADODB.Recordset") ------------------------------------------------------------------------------------------------------------ The line of code that gets the error is the open of the database. I have tried many things to get rid of this error, among them: registered the System.Data.SQLite.dll, added C:\Program Files\System.Data.SQLite\2010\bin to the PATH variable, re-installed System.Data.SQLite - checked first box to create assemblies, re-installed System.Data.SQLite again - checked second box to create GAC, modified the web_config, with and without the version and publickeytoken (Version=1.0.81.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139), . Does anyone know if there is something that I need to do differently in the code to access the SQLite databases? Or is there something wrong with the environment? Could it be a permissions problem? Is there a way I can increase the debug level to get a better log of the error? (I do not currently have Visual Studio installed on the server). Any help or ideas on how to fix this would be much appreciated. Thanks! Roger Rice.
@set @debug(on) <%@ Page aspcompat=true %> <html> <head><title>Display eMill Letter Counts</title></head> <body> <% 'Using System.Data Dim grand_total_emails As Integer Dim fso fso = Server.CreateObject("Scripting.FileSystemObject") Dim rootFolder rootFolder = fso.GetFolder(Server.MapPath("..\pub")) Dim subFolders subFolders = rootFolder.SubFolders Dim folder For Each folder in subFolders Response.Write ("FolderName: " & folder.Name & "<br>") %> <% dim rs,x, conn, dir conn=Server.CreateObject("ADODB.Connection") 'conn.provider="Microsoft.Jet.OLEDB.4.0" conn.provider="System.Data.SQLite" conn.Mode = 1 'conn.open(server.mappath("..\pub\" & folder.name & "\Messages.mdb")) conn.open(server.mappath("..\pub\" & folder.name & "\store.db3")) rs=Server.CreateObject("ADODB.Recordset") 'rs.open ("SELECT count(Receiver) " _ '& "FROM Messages " _ '& "where ModifyDate > DateTime.Today.AddHours(-4) " _ '& "and ModifyDate < DateTime.Today.AddHours(6) ",conn) rs.open ("SELECT count(Receiver) as total_emails " _ & "FROM Messages " _ & "where ModifyDate > Date() - .166666 " _ & "and ModifyDate < Date () + .25 ",conn) %> <!-- <h2>List Database Table</h2> --> <table border="1" width="50%"> <tr bgcolor="#b0c4de"> <% %> </tr> <%do until rs.EOF%> <tr bgcolor="#b0c4de"> <!-- <tr bgcolor="#f0f0f0"> --> <form method="post" action="demo_db_edit.asp" target="_blank"> <% for each x in rs.Fields if x.value > 0 Then %> <td><%Response.Write(x.value)%> </td> <%grand_total_emails = grand_total_emails + x.value%> <%end if next %> </form> <%rs.MoveNext%> </tr> <% loop rs.close rs=nothing conn.close conn=nothing %> </table> <% next %> <table border="1" width="50%"> <tr bgcolor="yellow"> <th>Grand Total for <%Response.Write(DateTime.Today.AddHours(-4) & " - " & DateTime.Today.AddHours(6))%></th> <td><%Response.Write(grand_total_emails)%> </td> </table> <% 'End Using %> </body> </html>
_______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users