16,021,041 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Visual Basic questions
View Javascript questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by edriso (Top 29 by date)
edriso
17-Dec-10 5:29am
View
again , another silly mistak, the problem was in the comma before the WHERE clause.
thank you very much
edriso
16-Dec-10 11:09am
View
the error message is in the title! thankx for your help (it is solved but if don't mind have a look to the below code)
thanks
edriso
16-Dec-10 8:08am
View
YESS, thank you very much , because a copy the code from another form i forgot this line, anyway it work fine now
can ask for your help with another one please.
the following code i have syntax error but i can't figure it out
<pre>
conn.Open()
cmd = New OleDbCommand("UPDATE core_skill SET crimping=?,cr_trainer=?,cr_doc=?,cr_date=?,soldering=?,so_trainer=?,so_doc=?,so_date=?,brazing=?,br_trainer=?,br_doc=?,br_date=?, where op_id=?", conn)
cmd.Parameters.AddWithValue("crimping", cr)
cmd.Parameters.AddWithValue("cr_trainer", TextBox6.Text.ToString)
cmd.Parameters.AddWithValue("cr_doc", TextBox3.Text)
cmd.Parameters.AddWithValue("cr_date", dd)
cmd.Parameters.AddWithValue("soldering", so)
cmd.Parameters.AddWithValue("so_trainer", TextBox7.Text.ToString)
cmd.Parameters.AddWithValue("so_doc", TextBox4.Text)
cmd.Parameters.AddWithValue("so_date", dd1)
cmd.Parameters.AddWithValue("brazing", br)
cmd.Parameters.AddWithValue("br_trainer", TextBox8.Text.ToString)
cmd.Parameters.AddWithValue("br_doc", TextBox5.Text)
cmd.Parameters.AddWithValue("br_date", dd2)
cmd.Parameters.AddWithValue("op_id", Integer.Parse(Label1.Text))
cmd.ExecuteNonQuery()
conn.Close()
</pre>
edriso
15-Dec-10 14:30pm
View
for some reason it works now thanks for you all
edriso
15-Dec-10 14:16pm
View
i have changed the column name and still gives the same error any idea why? please don't give up
thanks
edriso
13-Dec-10 14:27pm
View
it removes all the rows not the selected rows only
edriso
13-Dec-10 14:22pm
View
hii try ur code but i got this exception message,(Column named select cannot be found. Parameter name: columnName)
the checkboxes column header name is (select).
For x As Integer = DataGridView1.Rows.Count - 1 To 0 Step -1
If DataGridView1.Rows(x).Cells("select").Value Then
DataGridView1.Rows.Remove(DataGridView1.Rows(x))
End If
Next
edriso
11-Dec-10 16:55pm
View
i did try this one but still not working, any idea
Dim x As Integer
For x = (DataGridView1.Rows.Count - 1) To 0
If DataGridView1.Rows(x).Cells(1).Value = False Then
DataGridView1.Rows.Remove(DataGridView1.CurrentRow)
End If
Next
edriso
11-Dec-10 15:27pm
View
here is my code, but it is not working!
Dim x As Integer
Dim dt1 As DataTable
Dim row As DataGridViewRow
For x = 0 To dt1.Rows.Count
If dt.Rows(1).Item("checked") = False Then
DataGridView1.Rows.Remove(row)
End If
Next
edriso
5-Dec-10 15:24pm
View
done that, but when i uncheck the box sometimes it return a wrong row counted
ex ( if i cheched 1 box it counts 3 )
edriso
19-Nov-10 4:03am
View
thanks Geoff it works fine with the parameterised query, thank you
edriso
18-Nov-10 10:23am
View
hi
thanks for your replay, i did add this line but i got another ex.message
(syntax error (missing operator) in query expression.
edriso
12-Nov-10 9:02am
View
does it apply to vb.net 2008 as well
thanks
edriso
12-Nov-10 7:41am
View
THANKS , it works now , you'r a star mate thank you for your patience
edriso
12-Nov-10 7:20am
View
Geoff,
i change the query statment as you adviced, but now textbox1 shows this text "System.Data.DataRow" not the description.
edriso
12-Nov-10 6:23am
View
Well, i expect that when i select a product name from combobox the textbox will show the description for this product as is in the table, so i need one item from the table row.
edriso
12-Nov-10 5:52am
View
it comes up with this message " select*WHERE(product='system.data.datarowview') "
edriso
12-Nov-10 5:27am
View
i have changed the combobox dropdown style to dropdown list to disable writing in combobox, does it afect anything?
edriso
12-Nov-10 5:23am
View
did you mean in here
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
Dim connstrg As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=C:\Documents and Settings\hedris\My Documents\REGISTER.mdb;"
Dim conn As New OleDbConnection(connstrg)
Try
conn.Open()
Dim DA As New OleDbDataAdapter("select* FROM CLARUS where product='" & ComboBox1.SelectedItem.ToString() & "'", conn)
Dim ds As New DataSet
Dim dt As New DataTable
DA.Fill(ds, "clarus")
dt = ds.Tables("clarus")
If (dt.Rows.Count > 0) Then
TextBox1.Text = dt.Rows.Item(0).ToString()
Else
TextBox1.Text = " Please Add Description"
End If
conn.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
edriso
12-Nov-10 5:06am
View
the listed items comes from the same table from database see below
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim connstrg As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=C:\Documents and Settings\hedris\My Documents\REGISTER.mdb;"
Dim conn As New OleDbConnection(connstrg)
Try
conn.Open()
Dim DA As New OleDbDataAdapter("select* FROM CLARUS", conn)
Dim ds As New DataSet
DA.Fill(ds, "clarus")
ComboBox1.DisplayMember = "clarus.product"
ComboBox1.DataSource = ds
conn.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
edriso
12-Nov-10 4:55am
View
but in this case the code return no value from database whatever the selected item in combobox was
edriso
12-Nov-10 4:37am
View
I did that, but still the same.
edriso
11-Nov-10 10:53am
View
i amend the code to be
Dim DA1 As New OleDbDataAdapter("select* FROM CLARUS where product='" & ComboBox1.SelectedItem.ToString() & "'", conn)
but i have another ex.message now " there is no row at position (0)"
edriso
11-Nov-10 10:51am
View
hi Geoff
now i have another ex.message ( there is no row at position (0) )
thanks
edriso
11-Nov-10 10:16am
View
i done that and still have the same ex.message
edriso
11-Nov-10 10:13am
View
it is in one line in my source file
edriso
11-Nov-10 9:55am
View
thanks for your answer, i amend the code but still have the same ex.message, i forgot to mention that the combobox items comes from the same table does it make any conflection.
thanks
edriso
11-Nov-10 8:31am
View
i done that and still not working
edriso
11-Nov-10 8:30am
View
the ex is Operator '&' in not defined for string "select*from ......" and type 'dtarowview'
Show More