|
I can't modify my textfile within the ftp then??
|
|
|
|
|
No, there is no FTP command to "append text" or similar. As stated you can download the file, access it and upload it back.
|
|
|
|
|
can download the textfile from the ftp and upload back using vb.net?? Sorry but i want to make it happen!
|
|
|
|
|
So what are you having a problem with?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I want to make a small messanger that will recieve the text from a textfile inside my FTP. I dont know how to make this happen! Can someone tell me the coding how can i download the textfile, modify it and upload it back! Thanks!!
|
|
|
|
|
Search the articles for "FTP". You'll find a bunch of examples, mostly in C#, but they get the concepts acrossed.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
the articles from here?? on codeproject? because i am not finding a suitable one for me!
|
|
|
|
|
What, you want'ed it to be cut and paste and do everything exactly how you needed? It doesn't work that way. You have to read the articles and study the code to see what's going on so you can "roll your own". The articles and code samples are meant to teach techniques, not be free code snippets that work like plugin modules.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
This group "LEARNVBDOTNET" is a yahoo group of close-knit individuals who are gathering together to learn VB.Net under the guidance of Bill Dennis. He uploads lessons and files periodically to the group. This is not a site which you would use in place of CODE PROJECT though. It is for individuals who want to learn with others at the same level of experience as themselves in a very personal and interactive level. It is owned and operated by Bill Dennis. I am just a member, but found it usefull enough to make me want to share it here with my fellow CODE PROJECT lovers. I am not trying to advertise a competing site at all. Check it out and you will see what I mean.
Yahoo! Group LEARNVBDOTNET
Mark Linehan
|
|
|
|
|
get out of here if you don't like CodeProject (the best programming forum ever !! )
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
hello, i want have a messanger and i want to make the form to read the textfile every 2 seconds automatically! how can i do this? I want the textfile to be read by the form and put the words that are in the textfile into a RichBox which is situated in my form. Please help me in this!?
Adrian De Battista
|
|
|
|
|
If you want to read a text file every 2 seconds, drop a Timer on your form and set it's Interval for 2000 milliseconds. In the Tick event for the Timer, put your file reading code.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
where do i want to put the reading code? in the timer or in the formLoad? and how can I make the code?
|
|
|
|
|
Hello,
You would put the code in the Timer's Tick Event... just double click on the timer control and it should create the event for you.
To load a textfile into a richtextbox, look into the RichTextBox.Load(<parameters>) method.
I hope this helps,
Mitch
My sig:
"And it is a professional faux pas to pay someone else to destroy your computer when you are perfectly capable of destroying it yourself." - Roger Wright
Get Perpendicular! (Hitachi Storage)
My CodeProject Blog
Most recent blog post: April 11
|
|
|
|
|
Hi
I am a newbi ish at visal basic .net, i have some experiance with simple programs but am not too up to date and i have a couple of questions:
I am a web developer and use apache installed on my computer to develop within, it is start/stopped using command line calls to the apache.exe program (-k start, -k stop) is it possible for me to make a program which will start / stop these services as i do not want them running all the time.
Ideally i would like to use one of the shortcut buttons on my laptops keyboard to start a program which will toggle the status of the server, so i will need to know if the servie is running.
Thats about it, at the moment i do not have vb.net installed on my laptop, but i have exams tomorrow and after them i will have a day or so to play and it would be great to have a working program ASAP
Many thanks to all replies,
- Martyn
|
|
|
|
|
One key question is this: Are you running apache for linux or for windows?
With linux you can create a shell script that can do what your asking.
|
|
|
|
|
Windows, otherwise i would use a bash script.
I need certain softwares which do not have a linux equivalent, so am forced to use windows.
|
|
|
|
|
You can write a batch file that can accomplish this task. Use one for turning on and one for turning off.
Trying to keep it simple.......
Apache.exe -K start
apache.exe -K stop
|
|
|
|
|
I have a customer that has over 3000 photos and they need to be accessable inside the UI.
MY question is how is it that i can get thoses photos into the database with manually writing each record?
Is there a insert statement that i can use?
Pleae help;)!
|
|
|
|
|
You'll have to write a little application to import these pic's into the database. There is no INSERT statement that will do it for you automatically.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am trying to create an autocomplete combobox that can be readonly. My problem is with my autocomplete handler, not properly selecting the text. If I type slow, I have no problems, however, if I type fast, the selection does not work correctly; the "auto-completed" text is not selected properly. Please Help!
Autocomplete code:
<br />
Private Sub CompletionCombo_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyUp<br />
Dim sTypedText As String<br />
Dim iFoundIndex As Integer<br />
Dim oFoundItem As Object<br />
Dim sFoundText As String<br />
Dim sAppendText As String<br />
<br />
If Me.Items.Count > 0 Then<br />
'Allow select keys without Autocompleting<br />
Select Case e.KeyCode<br />
Case Keys.Back, Keys.Left, Keys.Right, Keys.Up, Keys.Delete, Keys.Down, Keys.ControlKey, Keys.ShiftKey, Keys.Alt, Keys.ShiftKey, Keys.MButton, Keys.LButton, Keys.RButton, Keys.Home, Keys.End<br />
'e.Handled = False<br />
Exit Sub<br />
End Select<br />
<br />
'Get the Typed Text and Find it in the list<br />
If Me.Text.Length > 0 And Me.Text.Length <> Me.SelectedText.Length Then<br />
sTypedText = Me.Text<br />
iFoundIndex = Me.FindString(sTypedText)<br />
<br />
'If we found the Typed Text in the list then Autocomplete<br />
If iFoundIndex >= 0 Then<br />
'Get the Item from the list (Return Type depends if Datasource was bound <br />
' or List Created)<br />
oFoundItem = Me.Items(iFoundIndex)<br />
<br />
'Use the ListControl.GetItemText to resolve the Name in case the Combo <br />
' was Data bound<br />
sFoundText = Me.GetItemText(oFoundItem)<br />
<br />
'Append then found text to the typed text to preserve case<br />
sAppendText = sFoundText.Substring(sTypedText.Length)<br />
Me.Text = sTypedText & sAppendText<br />
<br />
'Select the Appended Text<br />
Me.SelectionStart = sTypedText.Length<br />
Me.SelectionLength = sAppendText.Length<br />
'Me.SelectedIndex = iFoundIndex<br />
End If<br />
End If<br />
End If<br />
End Sub<br />
<br />
Private Sub CompletionCombo_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Leave<br />
Dim iFoundIndex As Integer<br />
<br />
If Me.Items.Count > 0 Then<br />
Dim sFoundText As String = ""<br />
If Me.SelectedText.Length <> Me.Text.Length Then<br />
sFoundText = Me.Text.Substring(Me.SelectedText.Length, Me.Text.Length - Me.SelectedText.Length)<br />
End If<br />
If sFoundText.Length > 0 Then<br />
iFoundIndex = Me.FindString(Me.Text)<br />
<br />
Me.SelectedIndex = iFoundIndex<br />
End If<br />
End If<br />
<br />
End Sub<br />
Thanks,
Jake
|
|
|
|
|
I dont know if u like this, im using "one sub auto complete combobox" and this i took from VB.net articles here:
<br />
Private Sub ComboBox1_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles ComboBox1.KeyPress<br />
<br />
Me.ComboBox1.DroppedDown = True<br />
<br />
If Char.IsControl(e.KeyChar) Then Return<br />
<br />
With Me.ComboBox1<br />
<br />
Dim ToFind As String = .Text.Substring(0, .SelectionStart) & e.KeyChar<br />
<br />
Dim Index As Integer = .FindStringExact(ToFind)<br />
<br />
If Index = -1 Then Index = .FindString(ToFind)<br />
<br />
'dont allow typing from non collection combobox list items<br />
If Index = -1 Then<br />
e.Handled = True<br />
Return<br />
End If<br />
<br />
.SelectedIndex = Index<br />
.SelectionStart = ToFind.Length<br />
.SelectionLength = .Text.Length - .SelectionStart<br />
<br />
e.Handled = True<br />
<br />
End With<br />
End Sub<br />
And i have found a problem when i m using typing instead of selecting an item from the combobox collection. Why this can happen? If i select item from combobox and add row to datatable it has no problem but if i typed half then i press tab button keyboard (then text suppose auto complete) , when i add this to datatable it cause error and the error is came from unreadable combobox. If i seletect instead of typing , this error wont come out.
|
|
|
|
|
Hi All,
I know this is a silly question and i have done this before.
When i use the single quote in writing a sql query in vb, anything typed after the single quote is taken as comment. How to get rid of this.
this is my code
sql = "SELECT * FROM Building WHERE ID = '" & id& "'" And Index = '" & bldindex & "'"
Please help.
Cheers
|
|
|
|
|
This has has been gone over about a thousand times in the forums...
The simple way to fix it is to NOT use string concatenation to build your SQL statements. Doing this just opens you up to all kinds of problems and attacks. Always use parameterized queries, unless ABSOLUTELY necessary. The parameter objects will escape any bad characters, like the problem your having, and also check for attacks embedded in the parameters that could damage the database.
You can check out a couple of examples here[^], and here[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello,
It could be because you have an extra quote that is causing the problem...I have colored it red...
sql = "SELECT * FROM Building WHERE ID = '" & id & "'" And Index = '" & bldindex & "'"
I hope this helps,
Mitch
My sig:
"And it is a professional faux pas to pay someone else to destroy your computer when you are perfectly capable of destroying it yourself." - Roger Wright
Get Perpendicular! (Hitachi Storage)
My CodeProject Blog
Most recent blog post: April 11
|
|
|
|