The remote server returned an error: (500) Syntax error, command unrecognized.
When I try to get the size of a file, The code matches what I found on the net and I also download a class with this function in it and I still get the same error. This has been driving me nuts for days now, I can't find any thing else on the matter on the net!
here is the code:
Dim u As New System.Uri("ftp://192.168.0.33/logo.ycb")
Dim FTPclient2 As System.Net.FtpWebRequest = CType(System.Net.FtpWebRequest.Create(u), System.Net.FtpWebRequest)
FTPclient2.Credentials = New System.Net.NetworkCredential(mLogin, mPassword)
In that case, you'll have to find a third party FTP client library that supports what you want it to do with the server that you're trying to connect to. I don't know of any myself, but a little Googling for ".net ftp client library" might come up with something.
Not sure if this would help, but I don't like your FTPclient2.UseBinary = False,
I tend to always use binary mode for FTP, avoiding a lot of problems.
Luc Pattyn [Forum Guidelines][My Articles] This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
..hi is me again..ya..i know it is weird and wrong in this code..i really no any idea that write function in sql statement...i only thing i think was i show time and date in textbox..then date and time in text box will insert in to database..in logintable..the time data type i change to text box...this method can work??i really have no idea how to add function in database.."...thanks for the reply..
The TextBox doesn't store the date/time in the database, your code does. A TextBox just displays the String equivilent of the value of a variable. You should NOT be storing dates and times in your database as Strings.
If I had a dollar for everytime I've answered this guy, I'd have his annual salary.
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
I have been trying to use click once deployment to deploy a 3 tire .net widows forms application. All seams to work fine apart from one very important aspect. As this application use Nhibernate for all database tasks, one of the Nhibernate configuration files is not being copied across. I have tried copying this file in both the configuration and resource folder and although this will include the folder and file in the deployment and copy the folder across with the configuration file in the folder, however, the application fails, as the application can not locate the configuration file.
The question is, can you copy none compliable files and include them in the deployment that when installed the file in question will be located with the application executable and assembly files?
Dim strSrc As String = "a9837498393874b8374683746386a8279323879b92837"<br />
Dim strDelim As String = "ab"<br />
Dim arrStrItem As String()<br />
arrStrItem = strSrc.Split(strDelim.ToCharArray)<br />
Ask not whether it is useful. Ask what it is useful for.
OK, this is something I have needed to do myself, so I created a little example code... Hope it helsp you:
Dim strSrc As String = "aF00000000000000000000000000000AAABB8500FFFFFFFFDa000000000000000000000000000000666567400FFFFFFFFDbF000000000000000000000000000008AABAA700FFFFFFFFDbF0000000000000000000000000000079AAA9800FFFFFFFFCaF00000000000000000000000000000A98BA9700FFFFFFFFCb000000000000000000000000000000EEEFFEE00FFFFFFFFBa000000000000000000000000000000EEFFFFF00FFFFFFFFCbF00000000000000000000000000000EEEEFED00FFFFFFFFCa000000000000000000000000000000BCDDEDA00FFFFFFFFDbF00000000000000000000000000000BDEDDDA00FFFFFFFFCb000000000000000000000000000000666654400FFFFFFFFD"<br />
' LOGIC:<br />
' First we replace the delimiters 'a' and 'b' with '*a' and '*b' <br />
' to get a single string array from the source string.<br />
' <br />
' We then run through the single array and assign the individual <br />
' items to their own string array; arrA and arrB.<br />
Dim strBuild As New System.Text.StringBuilder()<br />
strBuild.Replace("a", "*a")<br />
strBuild.Replace("b", "*b")<br />
' GETTING A SINGLE ARRAY:<br />
' Here, we split the source stringinto an array using the <br />
' asterisk (the '*' character) as the delimiter. This ensures <br />
' that we retain the 'a' and 'b' characters, which we will need <br />
' later on.<br />
Dim arrTemp As String()<br />
arrTemp = strBuild.ToString.Split("*")<br />
' BUILDING NEW ARRAYS:<br />
' We can now use the temporary array to build two new arrays. To <br />
'do so, we loop through the items and examine the leftmost <br />
' character. If that be 'a' then we assign the item to the <br />
' A-array; be it 'b' then we assing it to the B-array instead.<br />
Dim arrA As New ArrayList<br />
Dim arrB As New ArrayList<br />
For Each curStrItem As String In arrTemp<br />
If curStrItem.Length > 0 Then<br />
Select Case curStrItem.Substring(0, 1)<br />
Case "a"<br />
Case "b"<br />
Case Else<br />
' OOPS, something weird ... we ignore this item.<br />
End Select<br />
End If<br />
' DONE:<br />
' The arrA array-list now contains all the 'a' items and the <br />
' arrB array-list now contains all the 'b' items. When you get <br />
' here, you should probably deallocate variables, etc.<br />
For Each curItem As String In arrA<br />
Debug.Print("---" & vbCrLf & "B-items:")<br />
For Each curItem As String In arrB<br />
Debug.Print("--- END ---")<br />
Ask not whether it is useful. Ask what it is useful for.