By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,361 Members | 1,700 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,361 IT Pros & Developers. It's quick & easy.

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

P: n/a
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 !

Jan 12 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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.Close Connection)

If dr.HasRows = True Then
'' More commands

End If
conOP.Close()

Jan 12 '07 #2

P: n/a
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)

Big Charles wrote:
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 !
Jan 12 '07 #3

P: n/a
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.
"Big Charles" <ch**********@yahoo.comwrote in message
news:11**********************@m58g2000cwm.googlegr oups.com...
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.Close Connection)

If dr.HasRows = True Then
'' More commands

End If
conOP.Close()

Jan 12 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.