473,734 Members | 2,274 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need Help with code problem Willing to pay for help Please...

Hi,

I am new to this forumand I apologize as i am not a .net programmer but we
have a program being developed by a .net programmer. Nowwe have run into an
ftp snag and I think it is part ftp and part .net coding.

Heres the issue..

We have an image directory full of photos like 200,000 in it, and if you use
an ftp client to ftp to the site and then navagate to that file it will try
to read it / open it. Well of course it will time out and I understand that.
Now if i drag an image from my PC in the ftp client and drop it on top the
folder with the images it saves it there fine no error or timeout.

So our program will be uploading images to this dir and we need to have it
save the image to this dir and not open or read it just save the file to it.
Below is the code being used for the image upload and it still times out it
is obvious it is trying to read the file first.

Two questions is there an alternate way to ftp, a different command maybe..

Or better yet another way to get images from the users computer using this
program to our server??

Open to all ideas willing to pay for a fix / work around.

Code below and other forums we posted this on please review all data and
other forums we have put this on perl forums because our site uses perl, .net
forums, and ftp forums..

Please help us:

code
Friend Sub ftpfile()

Dim sFTPSrcFileName As String
Dim sFTPTgtFileName As String

' For testing purpose we have hard-coded the input file
sFTPSrcFileName = "D:\446224_2_th umb.jpg"
sFTPTgtFileName = "sample1.jp g"
Dim sURL As String
sURL = "ftp://ftp.mysite.com"
Inet1.Protocol = icFTP
Inet1.RequestTi meout = 60
Inet1.RemotePor t = 21
Inet1.AccessTyp e = icDirect
Inet1.URL = "ftp://ftp.mysite.com"
Inet1.UserName = "myusername "
Inet1.Password = "mypassword "
Inet1.Execute , "PUT" & sFTPSrcFileName & " " &
"/httpdocs/myfile/images/imgupld/" &sFTPTgtFileNam e

Me.WaitForRespo nse
Inet1.Execute sURL, "CLOSE"
Me.WaitForRespo nse

End Sub

Friend Sub WaitForResponse ()

Dim fWait As Boolean

On Error GoTo ErrHandler

fWait = True
Do Until fWait = False
DoEvents
fWait = Inet1.StillExec uting
Loop

ErrHandler:
Err.Clear
End Sub

Private Sub Command1_Click( )
Form1.ftpfile
Timer1.Enabled = True
Set Form1 = Nothing
Unload Me
End Sub

Private Sub Inet1_StateChan ged(ByVal State As Integer)
On Error Resume Next

Select Case State
Case icNone
Case icResolvingHost : Me.lblRESPONSE. Caption = "Resolving Host"
Case icHostResolved: Me.lblRESPONSE. Caption = "Host Resolved"
Case icConnecting: Me.lblRESPONSE. Caption = "Connecting ..."
Case icConnected: Me.lblRESPONSE. Caption = "Connected"
Case icResponseRecei ved: Me.lblRESPONSE. Caption = "Transferri ng File..."
Case icDisconnecting : Me.lblRESPONSE. Caption = "Disconnecting. .."
Case icDisconnected: Me.lblRESPONSE. Caption = "Disconnect ed"
Case icError: MsgBox "Error:" & Inet1.ResponseC ode & " " & Inet1.ResponseI nfo
Case icResponseCompl eted: Me.lblRESPONSE. Caption = "Process Complete."

End Select

Me.lblRESPONSE. Refresh

Err.Clear
End Sub
Sep 27 '05 #1
3 2047
The forums we posted on:
http://forums.devshed.com/t291783/s.html

http://forums.devshed.com/t291774/s.html

http://forums.devshed.com/t291765/s.html

http://forums.devshed.com/t291765/s.html
JGBNS wrote:
Hi,

I am new to this forumand I apologize as i am not a .net programmer but we
have a program being developed by a .net programmer. Nowwe have run into an
ftp snag and I think it is part ftp and part .net coding.

Heres the issue..

We have an image directory full of photos like 200,000 in it, and if you use
an ftp client to ftp to the site and then navagate to that file it will try
to read it / open it. Well of course it will time out and I understand that.
Now if i drag an image from my PC in the ftp client and drop it on top the
folder with the images it saves it there fine no error or timeout.

So our program will be uploading images to this dir and we need to have it
save the image to this dir and not open or read it just save the file to it.
Below is the code being used for the image upload and it still times out it
is obvious it is trying to read the file first.

Two questions is there an alternate way to ftp, a different command maybe..

Or better yet another way to get images from the users computer using this
program to our server??

Open to all ideas willing to pay for a fix / work around.

Code below and other forums we posted this on please review all data and
other forums we have put this on perl forums because our site uses perl, .net
forums, and ftp forums..

Please help us:

code

Friend Sub ftpfile()

Dim sFTPSrcFileName As String
Dim sFTPTgtFileName As String

' For testing purpose we have hard-coded the input file
sFTPSrcFileNam e = "D:\446224_2_th umb.jpg"
sFTPTgtFileNam e = "sample1.jp g"
Dim sURL As String
sURL = "ftp://ftp.mysite.com"
Inet1.Protoc ol = icFTP
Inet1.RequestT imeout = 60
Inet1.RemotePo rt = 21
Inet1.AccessTy pe = icDirect
Inet1.URL = "ftp://ftp.mysite.com"
Inet1.UserNa me = "myusername "
Inet1.Passwo rd = "mypassword "
Inet1.Execut e , "PUT" & sFTPSrcFileName & " " &
"/httpdocs/myfile/images/imgupld/" &sFTPTgtFileNam e

Me.WaitForResp onse
Inet1.Execut e sURL, "CLOSE"
Me.WaitForResp onse

End Sub

Friend Sub WaitForResponse ()

Dim fWait As Boolean

On Error GoTo ErrHandler

fWait = True
Do Until fWait = False
DoEvents
fWait = Inet1.StillExec uting
Loop

ErrHandler:
Err.Clear
End Sub

Private Sub Command1_Click( )
Form1.ftpfil e
Timer1.Enabl ed = True
Set Form1 = Nothing
Unload Me
End Sub

Private Sub Inet1_StateChan ged(ByVal State As Integer)
On Error Resume Next

Select Case State
Case icNone
Case icResolvingHost : Me.lblRESPONSE. Caption = "Resolving Host"
Case icHostResolved: Me.lblRESPONSE. Caption = "Host Resolved"
Case icConnecting: Me.lblRESPONSE. Caption = "Connecting ..."
Case icConnected: Me.lblRESPONSE. Caption = "Connected"
Case icResponseRecei ved: Me.lblRESPONSE. Caption = "Transferri ng File..."
Case icDisconnecting : Me.lblRESPONSE. Caption = "Disconnecting. .."
Case icDisconnected: Me.lblRESPONSE. Caption = "Disconnect ed"
Case icError: MsgBox "Error:" & Inet1.ResponseC ode & " " & Inet1.ResponseI nfo
Case icResponseCompl eted: Me.lblRESPONSE. Caption = "Process Complete."

End Select

Me.lblRESPONSE .Refresh

Err.Clear

End Sub

Sep 27 '05 #2
Hi,

First off, if you want to pay someone, you are free to use sites like
'rentacoder.com '. Service here is provided free.

Secondly, you do not have to use FTP. You can write an aspx web page that
will recieve the file, and you can have an html web page that provides a
'browse' button, collects the name of a local file, and posts it to the aspx
page on the server.

An example is here:
http://support.microsoft.com/default...b;en-us;323245

Normally, if you use a file system for storing large amounts of data, you
may want to have the receiving side move the files into subdirectories based
on some file attribute (like date, size, or id of the submitting user).

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"JGBNS via DotNetMonster.c om" <u14341@uwe> wrote in message
news:5500911db9 4d1@uwe...
Hi,

I am new to this forumand I apologize as i am not a .net programmer but we
have a program being developed by a .net programmer. Nowwe have run into
an
ftp snag and I think it is part ftp and part .net coding.

Heres the issue..

We have an image directory full of photos like 200,000 in it, and if you
use
an ftp client to ftp to the site and then navagate to that file it will
try
to read it / open it. Well of course it will time out and I understand
that.
Now if i drag an image from my PC in the ftp client and drop it on top the
folder with the images it saves it there fine no error or timeout.

So our program will be uploading images to this dir and we need to have it
save the image to this dir and not open or read it just save the file to
it.
Below is the code being used for the image upload and it still times out
it
is obvious it is trying to read the file first.

Two questions is there an alternate way to ftp, a different command
maybe..

Or better yet another way to get images from the users computer using this
program to our server??

Open to all ideas willing to pay for a fix / work around.

Code below and other forums we posted this on please review all data and
other forums we have put this on perl forums because our site uses perl,
.net
forums, and ftp forums..

Please help us:

code
Friend Sub ftpfile()

Dim sFTPSrcFileName As String
Dim sFTPTgtFileName As String

' For testing purpose we have hard-coded the input file
sFTPSrcFileName = "D:\446224_2_th umb.jpg"
sFTPTgtFileName = "sample1.jp g"
Dim sURL As String
sURL = "ftp://ftp.mysite.com"
Inet1.Protocol = icFTP
Inet1.RequestTi meout = 60
Inet1.RemotePor t = 21
Inet1.AccessTyp e = icDirect
Inet1.URL = "ftp://ftp.mysite.com"
Inet1.UserName = "myusername "
Inet1.Password = "mypassword "
Inet1.Execute , "PUT" & sFTPSrcFileName & " " &
"/httpdocs/myfile/images/imgupld/" &sFTPTgtFileNam e

Me.WaitForRespo nse
Inet1.Execute sURL, "CLOSE"
Me.WaitForRespo nse

End Sub

Friend Sub WaitForResponse ()

Dim fWait As Boolean

On Error GoTo ErrHandler

fWait = True
Do Until fWait = False
DoEvents
fWait = Inet1.StillExec uting
Loop

ErrHandler:
Err.Clear
End Sub

Private Sub Command1_Click( )
Form1.ftpfile
Timer1.Enabled = True
Set Form1 = Nothing
Unload Me
End Sub

Private Sub Inet1_StateChan ged(ByVal State As Integer)
On Error Resume Next

Select Case State
Case icNone
Case icResolvingHost : Me.lblRESPONSE. Caption = "Resolving Host"
Case icHostResolved: Me.lblRESPONSE. Caption = "Host Resolved"
Case icConnecting: Me.lblRESPONSE. Caption = "Connecting ..."
Case icConnected: Me.lblRESPONSE. Caption = "Connected"
Case icResponseRecei ved: Me.lblRESPONSE. Caption = "Transferri ng File..."
Case icDisconnecting : Me.lblRESPONSE. Caption = "Disconnecting. .."
Case icDisconnected: Me.lblRESPONSE. Caption = "Disconnect ed"
Case icError: MsgBox "Error:" & Inet1.ResponseC ode & " " &
Inet1.ResponseI nfo
Case icResponseCompl eted: Me.lblRESPONSE. Caption = "Process Complete."

End Select

Me.lblRESPONSE. Refresh

Err.Clear
End Sub

Sep 28 '05 #3
You don't define what INET is. What component or object are you using
to manage the ftp?

I use a c# ftp library (its open sourced and available on the Internet)
to do a whole host of ftp related automated tasks and it works just fine.
JGBNS via DotNetMonster.c om wrote:
Hi,

I am new to this forumand I apologize as i am not a .net programmer but we
have a program being developed by a .net programmer. Nowwe have run into an
ftp snag and I think it is part ftp and part .net coding.

Heres the issue..

We have an image directory full of photos like 200,000 in it, and if you use
an ftp client to ftp to the site and then navagate to that file it will try
to read it / open it. Well of course it will time out and I understand that.
Now if i drag an image from my PC in the ftp client and drop it on top the
folder with the images it saves it there fine no error or timeout.

So our program will be uploading images to this dir and we need to have it
save the image to this dir and not open or read it just save the file to it.
Below is the code being used for the image upload and it still times out it
is obvious it is trying to read the file first.

Two questions is there an alternate way to ftp, a different command maybe..

Or better yet another way to get images from the users computer using this
program to our server??

Open to all ideas willing to pay for a fix / work around.

Code below and other forums we posted this on please review all data and
other forums we have put this on perl forums because our site uses perl, .net
forums, and ftp forums..

Please help us:

code
Friend Sub ftpfile()

Dim sFTPSrcFileName As String
Dim sFTPTgtFileName As String

' For testing purpose we have hard-coded the input file
sFTPSrcFileName = "D:\446224_2_th umb.jpg"
sFTPTgtFileName = "sample1.jp g"
Dim sURL As String
sURL = "ftp://ftp.mysite.com"
Inet1.Protocol = icFTP
Inet1.RequestTi meout = 60
Inet1.RemotePor t = 21
Inet1.AccessTyp e = icDirect
Inet1.URL = "ftp://ftp.mysite.com"
Inet1.UserName = "myusername "
Inet1.Password = "mypassword "
Inet1.Execute , "PUT" & sFTPSrcFileName & " " &
"/httpdocs/myfile/images/imgupld/" &sFTPTgtFileNam e

Me.WaitForRespo nse
Inet1.Execute sURL, "CLOSE"
Me.WaitForRespo nse

End Sub

Friend Sub WaitForResponse ()

Dim fWait As Boolean

On Error GoTo ErrHandler

fWait = True
Do Until fWait = False
DoEvents
fWait = Inet1.StillExec uting
Loop

ErrHandler:
Err.Clear
End Sub

Private Sub Command1_Click( )
Form1.ftpfile
Timer1.Enabled = True
Set Form1 = Nothing
Unload Me
End Sub

Private Sub Inet1_StateChan ged(ByVal State As Integer)
On Error Resume Next

Select Case State
Case icNone
Case icResolvingHost : Me.lblRESPONSE. Caption = "Resolving Host"
Case icHostResolved: Me.lblRESPONSE. Caption = "Host Resolved"
Case icConnecting: Me.lblRESPONSE. Caption = "Connecting ..."
Case icConnected: Me.lblRESPONSE. Caption = "Connected"
Case icResponseRecei ved: Me.lblRESPONSE. Caption = "Transferri ng File..."
Case icDisconnecting : Me.lblRESPONSE. Caption = "Disconnecting. .."
Case icDisconnected: Me.lblRESPONSE. Caption = "Disconnect ed"
Case icError: MsgBox "Error:" & Inet1.ResponseC ode & " " & Inet1.ResponseI nfo
Case icResponseCompl eted: Me.lblRESPONSE. Caption = "Process Complete."

End Select

Me.lblRESPONSE. Refresh

Err.Clear
End Sub

Sep 28 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2193
by: John Flynn | last post by:
hi all i'm going to be quick i have an assignment due which i have no idea how to do. i work full time so i dont have the time to learn it and its due date has crept up on me .. As follows: Objectives The purpose of this assignment is to have you practice the design of object-oriented classes, including one or more of the following concepts
31
2635
by: mark | last post by:
Hello- i am trying to make the function addbitwise more efficient. the code below takes an array of binary numbers (of size 5) and performs bitwise addition. it looks ugly and it is not elegant but it appears to work. using time, i measured it takes .041s to execute, which i admit isnt much. but, the problem is that this procedure will be called many, many times in my project (probably at least a few thousand times, if not more) so...
6
7304
by: Rafael | last post by:
Hi Everyone, I need some help with my calculator program. I need my program to do 2 arguments and a 3rd, but the 3rd with different operators. Any help would be great. Here is my code.... #include <stdio.h> #include <stdlib.h>
3
434
by: JGBNS via DotNetMonster.com | last post by:
Hi, I am new to this forumand I apologize as i am not a .net programmer but we have a program being developed by a .net programmer. Nowwe have run into an ftp snag and I think it is part ftp and part .net coding. Heres the issue.. We have an image directory full of photos like 200,000 in it, and if you use an ftp client to ftp to the site and then navagate to that file it will try
17
10032
by: cpptutor2000 | last post by:
Could some C guru please help me? I have a simple piece of code as: #include <stdio.h> #include <stdlib.h> #include <openssl/rand.h> int main(){ unsigned char temp; RAND_bytes(temp, 4);
66
5389
by: genestarwing | last post by:
QUESTION: Write a program that opens and read a text file and records how many times each word occurs in the file. Use a binary search tree modified to store both a word and the number of times it occurs. After the program has read the file, it should offer a menu with three choices. the first is to list all the words along with the number of occurences. The second is to let you enter a word, with the program reporting how many times the...
1
1333
by: carlos123 | last post by:
Hello, I am using BlueJ and I am totally lost on my newest programming assignment. Here is my source code, i would really appreciate if someone helped me out. This is my assignment. Ive done some of the work like entering all the data in for the combo boxes. But I dont know how to get the combo box to display, and I dont know how to write and read to a file, im SOo lost. If someone could just PLEASE take a look at the code and try to fix the...
0
1039
by: Tsunami Tim | last post by:
To give you an idea of what I need help with... I am driving traffic to our company website with flyers that are going out to schools for our summer camp programs. All these flyers contain a "secret code" in the form of an eight digit number eg. 20081999 I have approx 8,000 flyers going out to schools with an individual code on each. These secret code flyers we will be giving away 1 free summer camp per school / location. What I am need of a...
0
8948
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
9315
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9246
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
8190
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...
1
6742
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6035
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3264
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
2
2733
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2182
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.