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
oIE.Navigate("http://188.8.131.52/") = New IO.FileStream("c:\Documents\details", IO.FileMode.Append, IO.FileAccess.Write)
What on earth is this??
Considering the FileStream class will not work with the HTTP protocol, you're concept won't work at all. Also, your web directory is probably going to be read only to every client, if this code is running on the client side, it wont be able to write to a file on the web server. Unless you do something very stupid and relax that security restriction.
Is this code in an ASP page?? Is it in some component running on the server?? What kind of app is it??
Remember, the quality of the answer you get is directly dictated by the quality of the question.
And don't use "urgent" anywhere in your post. It only makes people want to ignore you and you're not going to get an answer any faster.
I have some problem in loading an image in crystal report. I am using VS 2005 with CR 9.
I have a table adapter in which i used an unbound column "Image" of type System.Byte.
And I used the following code to set image.
Dim s As String = dt.Rows(0).Item("ImagePath").ToString
Dim fs As FileStream = New FileStream(s, FileMode.Open, FileAccess.Read)
Dim image(fs.Length) As Byte
But it throws an exception at (1) [Unable to cast type of System.IConvertible to type System.Byte]
I used to debug the code, and when i reached at (1), i found the datatype of dt.Rows(0).item("Image") = System.DBNull
Although it is set to type System.Byte at design time in Table Adapter.
I haven't used a Table Adapter like you are talking about, but one thought that came to me when reading this is that a System.Byte is not the same data type as your image variable. You need a Byte array. This code: Dim image(fs.Length) As Byte declares a Byte array, not a Byte.
I am adding values to a Access table (with around 25 values). A date conversion error occurs and I do not know in which line it occurs. It is practically very tedious to go line by line. How do I track this. Someone please help. Thank you in advance.
If you don't want to step through the debugger, do something like this:
Dim sb as StringBuilder = new StringBuilder()
// first line of insert
// second insert
Put this in a try/catch and put a breakpoint in the catch. Then, you can look at your string builder to see which line blew up. Then you can focus on that one line ( and repeat, I would not be surprised if you fix one line and then find another has the same issue, if the code does the same thing, you're likely to have repeated your bug more than once.
Driven to the arms of OSX by Vista.
Please read this[^] if you don't like the answer I gave to your question.
Do you want an array filled with the tables the DataSet contains? If so, and if you have included the System.Linq namespace, then you can use ds.Tables.ToArray(), where ds is your DataSet. The result of that method call will be the Tables property as an array
I'm new to vb.net,anyone of u please help.I need a syntax of how to save and retrieve an image in vb.net2008 and Access as backend.I've used 8 textfields,1 combobox and 1 picture box and 2 buttons of save and retrieve.But I dont know how to write a code to save and retrieve an image in vb.net2008.
First, you need to get VB.Net, as there is no support for VB6.
Second, No-one, and I really mean NO-ONE is going to do the code for you.
If you do not know how to even go about it, buy a beginners book and read it, slowly, twice, then when there is glimmering of understanding, attempt it yourself. When you fail, and you will, ask specific code questions about the portions of code you are failing on.
Thirdly, Never give your email address out, or you will suffer.
This constitutes a friendly reply, some here would really burn you for that.
VB6 doesn't have any image handling capability that would work with the speed required to detect a face. You'd have to use an external C++ library to give you more speed.
Also, the fact that you're even asking this question says that you don't have the skill required to implement a face dectection algorithm yourself. This will be quite a large research project for you. Since you don't have the skill to do the research yourself, you don't have the skill required to implement the algorithm.
But, I'll give you a hint. Start Googling for "face detection algorithm". You'll notice that most of the URL's you get in the search results are for universities. What does that tell you about the technology?