473,395 Members | 1,574 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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_thumb.jpg"
sFTPTgtFileName = "sample1.jpg"
Dim sURL As String
sURL = "ftp://ftp.mysite.com"
Inet1.Protocol = icFTP
Inet1.RequestTimeout = 60
Inet1.RemotePort = 21
Inet1.AccessType = icDirect
Inet1.URL = "ftp://ftp.mysite.com"
Inet1.UserName = "myusername"
Inet1.Password = "mypassword"
Inet1.Execute , "PUT" & sFTPSrcFileName & " " &
"/httpdocs/myfile/images/imgupld/" &sFTPTgtFileName

Me.WaitForResponse
Inet1.Execute sURL, "CLOSE"
Me.WaitForResponse

End Sub

Friend Sub WaitForResponse()

Dim fWait As Boolean

On Error GoTo ErrHandler

fWait = True
Do Until fWait = False
DoEvents
fWait = Inet1.StillExecuting
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_StateChanged(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 icResponseReceived: Me.lblRESPONSE.Caption = "Transferring File..."
Case icDisconnecting: Me.lblRESPONSE.Caption = "Disconnecting..."
Case icDisconnected: Me.lblRESPONSE.Caption = "Disconnected"
Case icError: MsgBox "Error:" & Inet1.ResponseCode & " " & Inet1.ResponseInfo
Case icResponseCompleted: Me.lblRESPONSE.Caption = "Process Complete."

End Select

Me.lblRESPONSE.Refresh

Err.Clear
End Sub
Sep 27 '05 #1
3 2000
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
sFTPSrcFileName = "D:\446224_2_thumb.jpg"
sFTPTgtFileName = "sample1.jpg"
Dim sURL As String
sURL = "ftp://ftp.mysite.com"
Inet1.Protocol = icFTP
Inet1.RequestTimeout = 60
Inet1.RemotePort = 21
Inet1.AccessType = icDirect
Inet1.URL = "ftp://ftp.mysite.com"
Inet1.UserName = "myusername"
Inet1.Password = "mypassword"
Inet1.Execute , "PUT" & sFTPSrcFileName & " " &
"/httpdocs/myfile/images/imgupld/" &sFTPTgtFileName

Me.WaitForResponse
Inet1.Execute sURL, "CLOSE"
Me.WaitForResponse

End Sub

Friend Sub WaitForResponse()

Dim fWait As Boolean

On Error GoTo ErrHandler

fWait = True
Do Until fWait = False
DoEvents
fWait = Inet1.StillExecuting
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_StateChanged(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 icResponseReceived: Me.lblRESPONSE.Caption = "Transferring File..."
Case icDisconnecting: Me.lblRESPONSE.Caption = "Disconnecting..."
Case icDisconnected: Me.lblRESPONSE.Caption = "Disconnected"
Case icError: MsgBox "Error:" & Inet1.ResponseCode & " " & Inet1.ResponseInfo
Case icResponseCompleted: 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.com" <u14341@uwe> wrote in message
news:5500911db94d1@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_thumb.jpg"
sFTPTgtFileName = "sample1.jpg"
Dim sURL As String
sURL = "ftp://ftp.mysite.com"
Inet1.Protocol = icFTP
Inet1.RequestTimeout = 60
Inet1.RemotePort = 21
Inet1.AccessType = icDirect
Inet1.URL = "ftp://ftp.mysite.com"
Inet1.UserName = "myusername"
Inet1.Password = "mypassword"
Inet1.Execute , "PUT" & sFTPSrcFileName & " " &
"/httpdocs/myfile/images/imgupld/" &sFTPTgtFileName

Me.WaitForResponse
Inet1.Execute sURL, "CLOSE"
Me.WaitForResponse

End Sub

Friend Sub WaitForResponse()

Dim fWait As Boolean

On Error GoTo ErrHandler

fWait = True
Do Until fWait = False
DoEvents
fWait = Inet1.StillExecuting
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_StateChanged(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 icResponseReceived: Me.lblRESPONSE.Caption = "Transferring File..."
Case icDisconnecting: Me.lblRESPONSE.Caption = "Disconnecting..."
Case icDisconnected: Me.lblRESPONSE.Caption = "Disconnected"
Case icError: MsgBox "Error:" & Inet1.ResponseCode & " " &
Inet1.ResponseInfo
Case icResponseCompleted: 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.com 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_thumb.jpg"
sFTPTgtFileName = "sample1.jpg"
Dim sURL As String
sURL = "ftp://ftp.mysite.com"
Inet1.Protocol = icFTP
Inet1.RequestTimeout = 60
Inet1.RemotePort = 21
Inet1.AccessType = icDirect
Inet1.URL = "ftp://ftp.mysite.com"
Inet1.UserName = "myusername"
Inet1.Password = "mypassword"
Inet1.Execute , "PUT" & sFTPSrcFileName & " " &
"/httpdocs/myfile/images/imgupld/" &sFTPTgtFileName

Me.WaitForResponse
Inet1.Execute sURL, "CLOSE"
Me.WaitForResponse

End Sub

Friend Sub WaitForResponse()

Dim fWait As Boolean

On Error GoTo ErrHandler

fWait = True
Do Until fWait = False
DoEvents
fWait = Inet1.StillExecuting
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_StateChanged(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 icResponseReceived: Me.lblRESPONSE.Caption = "Transferring File..."
Case icDisconnecting: Me.lblRESPONSE.Caption = "Disconnecting..."
Case icDisconnected: Me.lblRESPONSE.Caption = "Disconnected"
Case icError: MsgBox "Error:" & Inet1.ResponseCode & " " & Inet1.ResponseInfo
Case icResponseCompleted: 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
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:...
31
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...
6
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.... ...
3
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...
17
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
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...
1
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...
0
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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
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...
0
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
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...
0
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...

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.