473,609 Members | 1,818 Online
Bytes | Software Development & Data Engineering Community
+ 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 maxRequestLengt h="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 2792
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.OdbcDataRe ader
Dim conOP As OdbcConnection =
MyFunctions.odb cConexion(strPa th_Of_DBF)
conOP.Open()
MySQL = "SELECT numdle, apepat, apemat, nombre FROM " +
strFileName_Of_ DBF
Dim cm As New Odbc.OdbcComman d(MySQL, conOP)
dr =
cm.ExecuteReade r(System.Data.C ommandBehavior. CloseConnection )

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 maxRequestLengt h="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**********@y ahoo.comwrote in message
news:11******** **************@ m58g2000cwm.goo glegroups.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.OdbcDataRe ader
Dim conOP As OdbcConnection =
MyFunctions.odb cConexion(strPa th_Of_DBF)
conOP.Open()
MySQL = "SELECT numdle, apepat, apemat, nombre FROM " +
strFileName_Of_ DBF
Dim cm As New Odbc.OdbcComman d(MySQL, conOP)
dr =
cm.ExecuteReade r(System.Data.C ommandBehavior. CloseConnection )

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
7995
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 based) with the following code: InputStream in = client.getInputStream(); BufferedImage rimg = ImageIO.read(in); File file = new File("d:\\ajay.jpg");
0
2407
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 this case: The server send a block of 15 letter A. At the time NetworkStream.Read is called (on client machine), the client machine has only received 3 letter A: Server (send): AAAAAAAAAAAAAAA Client (receive): AAA
4
3900
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 HtmlInputFile has an HttpPostedFile object containing the client side path to the selected file, there must be some way to resolve this path server side allowing me to open the file with as Stream object.. I've been looking at WebClient.OpenRead,...
9
7900
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
9489
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 to a link if possible. Thanks, Dinoo
0
4714
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 the client application establish a connection, and send data, which appears in plain, de-crypted text on the server - this works.
8
2329
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 still read the old data (if it was read earlier) and this is causing data corruption. WinNT clients inlcuding windows2000 & XP do not have this issue. The program is complied in VC++, console mode. I am unable to understand the cause. I flush the...
8
2916
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 in IE from a client (http://server/readexcel.aspx) and try to read a local Excel file, the file cannot be opened. I imagine it's some kind of a security problem in sending the Excel data back to the web server, but I am not sure.
4
3195
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 the StreamReader Class. Is it possible to use this class when trying to read and write to a text file located on a server? If so, could you please provide some examples? I have setup a free web host with www.ifastnet.com and have some connection...
0
8133
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8083
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8573
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8224
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8406
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7013
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4091
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2535
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 we have to send another system
0
1393
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.