|
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.
Hope this helps.
|
|
|
|
|
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 your running thing under the debugger, it'll stop on the exact line the problem occurs.
Also, if you're using string concatenation to "build" the SQL statement, it's very easy to get an error like your describing:
sql = "SELECT something FROM table WHERE field1 = #" & datevalue & "#"
Use parameterized queries instead to have the code automatically convert the date to the appropriate format for the database engine.
|
|
|
|
|
Thank you Dave. I was using parameterized query and it was driving me mad. As you have instructed
i used straight query like this
sql = "SELECT something FROM table WHERE field1 = #" & datevalue & "#"
and solved the problem within no time.
Thanks also to Rajdeep and Christian for your replies.
|
|
|
|
|
Uhhh...no. I said DO NOT do that. Use the parameterized query instead.
|
|
|
|
|
Ideally this should not happen. Are you not doing any sort of validations?
|
|
|
|
|
If you don't want to step through the debugger, do something like this:
Dim sb as StringBuilder = new StringBuilder()
// first line of insert
sb.AppendLine("Inserted one")
// second insert
sb.AppendLine("Inserted two")
etc
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.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
|
|
|
|
|
I am using VB 2005 and have connected to an Access database.
Rather than do the usual for i = 0 to total, can you populate an array with the dataset some how.
|
|
|
|
|
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
|
|
|
|
|
Or if you want to enter the values of a certain column from the dataset into the array you can use the For Each loop:
For Each rw As DataRow In YourDataSet.Table("WhatEverTable").Rows
Or considering that a dataset, in a sense, is a sophisticated array, you could consider forgetting about copying values to an array first, and just get them straight from the dataset.
My advice is free, and you may get what you paid for.
|
|
|
|
|
Hello!
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.
Help me, pleassse
Mirza
|
|
|
|
|
|
You can't possibly be the first one to ever want to do this. So, a little Google goes a long way, and I see that it's been documented about 40,000 times. Here, allow me... Click This[^].
|
|
|
|
|
I want ti know how to detect face from human picture using VB 6.0.but i don't know how to do it.please tell me and send VB 6.0 source code that program.please sent reply soon.
My mail address is "sumudu1986@gmail.com"
|
|
|
|
|
Good luck with that.
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.
------------------------------------
"When Belly Full, Chin Hit Chest"
Confucius 502BC
|
|
|
|
|
"Some here"?? Noone here is going to burn him for it, but the spammer idiots out in the world will surely handle that themselves.
|
|
|
|
|
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?
|
|
|
|
|
I knew the task would be too much for him, it is a Massive Ask.
Certainly not something to be tried by anyone under the level of "Expert"
------------------------------------
"When Belly Full, Chin Hit Chest"
Confucius 502BC
|
|
|
|
|
@Dalek and Dave
i want to ,sir, is this thing possible under vb 2008
vb2008 seems much more advanced than the previous versions
and one more thing
the one who started this thread is a girl(well, the name is of a girl)
cheers.
TheMrProgrammer
|
|
|
|
|
TheMrProgrammer wrote:
the one who started this thread is a girl(well, the name is of a girl)
Ah, forgive me, an obvious cultural difference, for us Europeans, Asian names can sometimes be rather non-gender-specific.
I imagine it is sometimes true in reverse.
I would say it WAS possible, but still insanely difficult.
There is all the code for looking at images, then looking at specific areas of an image, then comparing data models for eyes, nose mouth etc, then ensuring they are in the relative positions to give then an overall facial matrix and then that they are not merely coincidental images that fall into the similar pattern to form a face.
(Note: Even the human brain does this when it sees faces in clouds or Marmite jars!)
Possible? Yes!
Easy? No!
------------------------------------
"When Belly Full, Chin Hit Chest"
Confucius 502BC
|
|
|
|
|
TheMrProgrammer wrote: the one who started this thread is a girl(well, the name is of a girl)
And how would the fact that the OP owns a vagina change anything we have said ?
TheMrProgrammer wrote: i want to ,sir, is this thing possible under vb 2008
I recommend reading the article linked to in my sig, it will solve your issues.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
|
|
|
|
|
Since all versions of VB do not support pointers, getting that the image data without an external component is VERY slow. It could be done, just with horrible performance.
|
|
|
|
|
ashika1986 wrote: My mail address is "sumudu1986@gmail.com"
You're a moron. Know htat none of the spam you get from posting your address here, will be from the owners of CP. It will be from people who trawl the web for folks stupid enough to publically post their email. Apart from that, what the others said. VB6 is crap, and unsupported, this is a massive task, even in a real language, and it's clear on all fronts that you're too stupid for this task. Let your client know you're a liar.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
|
|
|
|
|
Blimey Mate, don't sit on that fence will you!
Why don't you tell him how you really feel!
But yeah, Email Addys in a public forum? A gift!
As for what he wants? He best forget it!
------------------------------------
"When Belly Full, Chin Hit Chest"
Confucius 502BC
|
|
|
|
|
I'm still trying to work out why someone thought you'd give them VB.NET code, AND felt that we needed to know that the OP is a girl. So what ?
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
|
|
|
|