I am trying to write my first web service ever.. it's supposed to open up an access database, import in the data and save it into a sql database. I have working code that will do this in a regular program, but the problem with the regular program is when I ftp'd the file up it wouldn't see it (filesystemwatcher) for some reason and wouldn't import it in.
So I thought, alright, let's make this a web service that I can call from our local computer at the office after it uploads the file and then the web service can automatically bring it in. Sounds good, right?
The last line in my code below is where it errs..
The error is:
The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine
I know that there is no 64 bit oledb library and I think that is why it is throwing the error.
I have done some research and determined that if I go into the iis manager I can cause the site to run entirely in 32 bit mode by enabling it. I really would rather the site run the way it is, since it runs so wonderfully, but maybe just make the asmx page itself run under 32 bit. Is this possible or does anybody have a more elegant solution?
Dim sAccessConnStr As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source='" & cAccessDBPath & _
"';Persist Security Info=True;"
Dim sSQLConnStr As String = System.Configuration.ConfigurationManager.ConnectionStrings _
Dim sGetQry As String = "Select * From Daily_SalesData;"
Dim sSaveQry As String = "Select * From dbo.Daily_SalesData;"
Dim accessTable As DataTable, sqlDS As DataSet, sqlTable As DataTable
Dim sqlAdapter As SqlDataAdapter, sqlBuilder As SqlCommandBuilder
'Begin by reading in the table from access into a datatable
Dim iRowsAffected As Integer, sStatus As String = ""
sStatus = myFuncs.AddStringArg(sStatus, "Connecting to Access DB..", vbCrLf)
Using accessConnection As OleDbConnection = New OleDbConnection(sAccessConnStr)
Dim accessAdapter As OleDbDataAdapter = New OleDbDataAdapter(sGetQry, accessConnection)