|
AFAIK an INSERT statement does not take a WHERE clause. New records just get added to a table.
Ref.[^]
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Well the intention is to edit an existing datarow populated on my form where the Primary key is the textbox.text....
|
|
|
|
|
You should buy a book on SQL perhaps.
The update command appears to be what you want. You do realise that putting your sql in your presentation code makes for an unmaintainable mess, right ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Can you give me an example of Update command?
|
|
|
|
|
okay thanks i got it. Update command is working now
|
|
|
|
|
Hello.
I am currently developing an application that uses the component MapWinGIS, I managed to make a zoom on the map, move, etc. ...
My current problem is that I do not know how to handle the event click on the map control: click on an object (eg a town) to display information from the latter.
Thank you in advance for your prompt replies.
|
|
|
|
|
|
I looked but I could not find. Could you elaborate?
|
|
|
|
|
|
http://users.telenet.be/voorbeeld/vb.JPG[^]
how can i create somthing like this in visual studio 2008
i don't find nothing for doing this like the exampel and i don't want to use 100's off button's any help or direction
T'hanks
|
|
|
|
|
I am not going to follow a link from someone I do not know. This is no reflection on you, just a rule I have.
Therefore can you describe what you are trying to do?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
i try to explain
you have 14 Squares with 42 numbers in it
you can select 6 numbers at eatch Square
if you do this with buttons you have 588 this is big
is there a other way to do this
t'hanks
|
|
|
|
|
As Luc has said below, I would simply draw lines to represent the squares and use the Graphics.DrawString() method to 'paint' the numbers in each square.
Again, as Luc has said, you could use a Panel and add the code to do the above to the Paint event handler of the Panel .
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Things like that I create by code, and not through Visual Designer.
So get a Panel, and add stuff to its Paint handler for drawing the squares and the numbers.
Decide on a data structure to keep track of the numbers you want marked.
Good luck with our lottery!
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Hello,
I have 15 textboxes ( textbox1 => textbox15).
After calculating the values, i want to clear them with a single press on a button:
I tried:
For Each ctl As Control In Me.Controls
If TypeOf ctl Is TextBox Then
ctl.Text = ""
End If
Next
but it won't work. What am I doing wrong?
Thanks in advance
Luc
|
|
|
|
|
hi
dim arratxt as object = {textbox1,textbox2textbox3,textbox4,textbox5, ... textbox15}
for i as integer = 0 to arratxt.length
arratxt(i).text=""
next
|
|
|
|
|
Putting object to an array initializer?
|
|
|
|
|
|
That doesn't work
See following error:
Error 1 Array initializers are valid only for arrays, but the type of 'arratxt' is 'Object'.
|
|
|
|
|
this is for 3 textbox
Dim ObjArray() As Object = {TextBox1, TextBox2, TextBox3}
For i As Integer = 0 To ObjArray.Length - 1
ObjArray(i).text = ""
Next
|
|
|
|
|
This works;
Dim xTextBox As TextBox = Nothing
For Each xObject As Object In Me.Controls
If TypeOf xObject Is TextBox Then
xTextBox = xObject
xTextBox.Text = ""
End If
Next
|
|
|
|
|
He still doesn't clear anything of my textboxes
|
|
|
|
|
Who doesn't?
I chucked some text boxes and a button on the form, the text boxes had random text in them, the code above is in the button click event.
It works for me! Did you try what i posted?
|
|
|
|
|
Yes, i copied into the button click event. But nothing happened
Could it be a problem that my textboxes are also inside a groupbox?
|
|
|
|
|
no problem
no defrence
Dim ob() As Object = {TextBox1, TextBox2}
For i As Integer = 0 To ob.Length - 1
ob(i).text = ""
Next
|
|
|
|