Can ASP.NET read a DBF file from client PC to Server?

B

Big Charles

Hello,

My ASP.NET application has to read a DBF file in a CD from CD-Drive of
a client PC. Then, I have to pass the data to a DataReader.
The route is: Client-PC -> Server
The DBF file could be between 20MB - 40MB, which is quite large.

If the ASP.NET application has to upload the file, then I would have to
change in the web.config this value:
<httpRuntime maxRequestLength="4096" > and instead of 4096, put
another higher number.

Is there any way to read the DBF file from the client-PC without doing
upload?
Maybe should I develop some ActiveX control that will be installed only
in some PCs?
Or host some Windows Controls in my ASP.NET app that will alow reading
DBF file from client PC?

What about if I pass the DBF file to an XML file?
Even that XML file should be uploaded by the ASP.NET app?

Thanks a lot !
 
B

Big Charles

When I got the path and the file name of the DBF from the CD-Drive of
the client PC, then I would be able to pass the data to a DataReader:

Dim dr As Odbc.OdbcDataReader
Dim conOP As OdbcConnection =
MyFunctions.odbcConexion(strPath_Of_DBF)
conOP.Open()
MySQL = "SELECT numdle, apepat, apemat, nombre FROM " +
strFileName_Of_DBF
Dim cm As New Odbc.OdbcCommand(MySQL, conOP)
dr =
cm.ExecuteReader(System.Data.CommandBehavior.CloseConnection)

If dr.HasRows = True Then
'' More commands

End If
conOP.Close()
 
B

bruce barker

you could write an active/x control to read the cd, but it would still
need to send the data to the server, which would still have the request
limit. if you just need a few rows, a rather then all the data it is
probably worth it. you shoudl take some care to make the control safe.

-- bruce (sqlwork.com)
 
N

Norman Yuan

If the path is a folder on a client computer, your code will not work,
because the ASP.ENT code is run in web server. Also, web server code cannot
access client computer's resources.

You need something running on client side, such as Java applet or activeX
control enbedded in the web page. However, due to the common security
consideration, they most likely are disabled on a client browser. That is,
user must explicitly allow the ActiveX control/Java applet to be downloaded
and installed to his computer.

You may want to consider a different approach for transfer that amount of
data via the Internet, not only from the point view of client security, but
also the connection speed limitation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top