简体   繁体   中英

Asp.net C# Fileupload and Access Interaction

I'm building a webapp that needs to interact with a Access Database. The Access database is about 200 megs and I don't want to upload the entire thing...just the contents of one table. So far, I've used Microsoft.Office.Interop.Access in the past on a desktop app but when I tried this on a webapp there is some cryptic permission issues on the web server(I think) that need to be ferreted out.

As far as I understand it I can 1 - upload the entire database and select the data 2 - I can use interop and figure out the permission issues

is there a 3 or 4 option?

Thanks guys.

我不知道我是否理解您的问题,但是也许您可以使用CSV文件上传表数据,然后解析每一行并使用SQL查询将这些数据插入Access数据库。

The location of the access file doesn't matter as long as it is accessible local or through the network and the NETWORK account of the webserver (if it is a Win2K3 or higher server otherwise it's the ASP.NET account) has access to that location. So no need to download or upload anything. Also... the fact that your back-end is dealing with an access database shouldn't be visible or be of any concern to the client...

OTOH if you are looking for a solution to "manage a database through a web interface", then maybe it's better to look at something like this ... (It's for sql server, but migrating from access to sql server isn't that big an issue ;-)

If you want to code it yourself, i think this post can come in handy. No need to interop, just use an OleDbConnection with the right connectionstring.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM