473,495 Members | 2,058 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

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
3 2784
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
7981
by: IndianOZ | last post by:
Hi , I'm trying to send an Image over the Socket Connection (from the Client using winsock, which is a VB based client) and at the other end I'm reading the Stream (at the Server which is java...
0
2387
by: Hai Ly Hoang \(MT00KSTN\) | last post by:
Hi, FileStream.Read(buf, offset, siz) will return when reaching the end of file or a block (size siz) can be read from the file. In the case of NetworkStream, it's more confusing. Now, consider...
4
3891
by: Michael | last post by:
I am trying to open a file on the client machine from an aspx page running server side. The design requirements of the page specify that the HtmlInputFile control is not to be used. Since the...
9
7878
by: John Howard | last post by:
How can I read a text file that is on a UNIX server in VB.Net? Please keep it simple. Thanks, John
6
9462
by: dinoo | last post by:
Hi, I would appreciate if some one could help me out. I have to read a client side ini file in Aspx page and use that data in server side processing. Can any one help me out here? Please refer...
0
4693
by: phplasma | last post by:
Hey, I am currently attempting to implement a multi-threaded C# socket, using SSL (.pem file/certification/private key combo) server using Visual Studio C# Express. I have successfully made...
8
2315
by: dosworldguy | last post by:
I have been having a very peculiar issue from a long time. I have an application where multiple clients read from a shared set of files. When a record is changed, sometimes the win9x clients...
8
2907
by: Johnny | last post by:
Hi all: I have an ASP.NET form that reads an Excel file and populates a datagrid. If I load the form in IE on the server, and select a local file, the code works fine. However if I load the form...
4
3190
by: Ross | last post by:
Hello, I am trying to Read and Write to a text file on a web server using Microsoft Visual Basic 2005 Express Edition. So far I have managed to complete my testing with a local text file using...
0
7120
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7196
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7373
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5456
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4897
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4583
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1405
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
649
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
286
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.