Click here to Skip to main content
15,896,492 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: sum up rows in excel Pin
Dalek Dave31-May-09 23:39
professionalDalek Dave31-May-09 23:39 
GeneralRe: sum up rows in excel Pin
priy@1-Jun-09 0:00
priy@1-Jun-09 0:00 
GeneralRe: sum up rows in excel Pin
Dalek Dave1-Jun-09 1:01
professionalDalek Dave1-Jun-09 1:01 
GeneralRe: sum up rows in excel Pin
priy@3-Jun-09 19:17
priy@3-Jun-09 19:17 
GeneralRe: sum up rows in excel Pin
Dalek Dave3-Jun-09 22:29
professionalDalek Dave3-Jun-09 22:29 
Questionhi any one plzzz help urgent Pin
harieshkumar.n31-May-09 20:32
harieshkumar.n31-May-09 20:32 
AnswerRe: hi any one plzzz help urgent Pin
Christian Graus31-May-09 21:51
protectorChristian Graus31-May-09 21:51 
AnswerRe: hi any one plzzz help urgent Pin
0x3c01-Jun-09 0:29
0x3c01-Jun-09 0:29 
Dear me. Please tell me that's just a proof of concept. There are so many things wrong with it. You assign a value to a method invocation. You use what appears to be an uninitialised variable. You take input from the user and send it with no verification, leaving you open to injection attacks. And your methodology is pretty much completely wrong. You've even posted a real IP address (which appears to need credentials to be accessed; I hope you provide them)

Your basic idea is to create a text file from your atrociously named controls, and upload it to a server somewhere in the Great Aether. So drop that code snippet and look into the WebClient class

What you need to do is to write a file to a byte array (no need to save it, the UploadData method accepts a byte array and saving just creates a new bottleneck) and call the UploadData method. So create a MemoryStream and StreamWriter. The StreamWriter should be constructed using the MemoryStream. Now, write the data to the StreamWriter in the normal way.

Next, create the WebClient instance, and declare a byte array. The byte array should be equal to the result from the invocation of the MemoryStream's ToArray method. You now have the 'file' as an array of bytes. Then, simply invoke the UploadData of the WebClient instance, passing the web address and the byte array you declared earlier. This will block execution until the upload finishes; if you fancy a challenge, dig into the documentation - there's a method which performs the same operation asynchronously and raises an event when it's done. The return value of the UploadData method is simply the response - it's useful for debugging to see where something went wrong

If, as I suspect, your HTTP server needs credentials, then set the Credentials property of the WebClient instance you declared accordingly

Between the idea
And the reality
Between the motion
And the act
Falls the Shadow

AnswerRe: hi any one plzzz help urgent Pin
Dave Kreskowiak1-Jun-09 2:06
mveDave Kreskowiak1-Jun-09 2:06 
QuestionImage not loading in Crystal Report Pin
Ovais Memon31-May-09 19:52
Ovais Memon31-May-09 19:52 
AnswerRe: Image not loading in Crystal Report Pin
Kschuler1-Jun-09 8:12
Kschuler1-Jun-09 8:12 
QuestionHow do I track in which line the error exactly occurs ? Pin
tiagu31-May-09 4:55
tiagu31-May-09 4:55 
AnswerRe: How do I track in which line the error exactly occurs ? Pin
Dave Kreskowiak31-May-09 5:45
mveDave Kreskowiak31-May-09 5:45 
GeneralRe: How do I track in which line the error exactly occurs ? Pin
tiagu31-May-09 21:28
tiagu31-May-09 21:28 
GeneralRe: How do I track in which line the error exactly occurs ? Pin
Dave Kreskowiak1-Jun-09 1:47
mveDave Kreskowiak1-Jun-09 1:47 
AnswerRe: How do I track in which line the error exactly occurs ? Pin
dan!sh 31-May-09 5:49
professional dan!sh 31-May-09 5:49 
AnswerRe: How do I track in which line the error exactly occurs ? Pin
Christian Graus31-May-09 12:27
protectorChristian Graus31-May-09 12:27 
QuestionHow do you populate an array with dataset values Pin
directred31-May-09 1:12
directred31-May-09 1:12 
AnswerRe: How do you populate an array with dataset values Pin
0x3c031-May-09 1:23
0x3c031-May-09 1:23 
AnswerRe: How do you populate an array with dataset values Pin
Johan Hakkesteegt31-May-09 19:56
Johan Hakkesteegt31-May-09 19:56 
QuestionHow to save and retrieve an image in Access using vb.net Pin
mirzamujib31-May-09 0:39
mirzamujib31-May-09 0:39 
AnswerRe: How to save and retrieve an image in Access using vb.net Pin
0x3c031-May-09 1:30
0x3c031-May-09 1:30 
AnswerRe: How to save and retrieve an image in Access using vb.net Pin
Dave Kreskowiak31-May-09 3:28
mveDave Kreskowiak31-May-09 3:28 
QuestionAbout Auto detecting immage face Pin
ashika198630-May-09 23:29
ashika198630-May-09 23:29 
AnswerRe: About Auto detecting immage face Pin
Dalek Dave31-May-09 1:52
professionalDalek Dave31-May-09 1:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.