16,020,666 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 Jake Robert (Top 12 by date)
Jake Robert
27-Aug-15 2:37am
View
I did an alternative but not really what I wanted. I made the crystal report populate the data given horizontally. It did looked like what I imagined it to be but with different approach.
Jake Robert
27-Aug-15 2:34am
View
That thread hasn't been resolved yet and there's no concrete or slight clue for a solution.
Jake Robert
5-Aug-15 20:50pm
View
It worked as well when I am adding/inserting new entry but still, it blocks the currently selected entry when updating. It also reads it as a duplicate even when updating.
Do I have to create another Query and Command when updating?
Jake Robert
5-Aug-15 20:38pm
View
Gonna try your idea too. Thanks :) Will update as soon as I test it.
Jake Robert
5-Aug-15 4:47am
View
I use MS Access as database.
Jake Robert
5-Aug-15 4:44am
View
Gonna try it maybe tomorrow. My head is already spinning. I will update you as soon as I test your solution.
Thanks :)
Jake Robert
5-Aug-15 4:29am
View
Here it is
Dim CompQuery As String = "SELECT * FROM Company WHERE CompanyName = '" & txtCompName.Text & "' AND AssociationID = " & cmbUnderAssoc.SelectedValue & " "
I also updated my question for a better view.
Jake Robert
21-Jul-15 19:56pm
View
I use the cell mouseclick to get the displayed data in the datagridview.
So when I single-clicked a dataset in the datagridview, it will transfer the value of a single row into the textbox.
Jake Robert
20-Jul-15 4:36am
View
But when I remove the parenthesis it pops out an error like this:
Syntax error (missing operator) in query expression 'Sector.SectorID=Association.SectorID INNER JOIN Company ON Association.AssociationID=Company.AssociationI'.
Maybe the problem is really how I will put the parenthesis for the 4th join. I have followed your solution though. It pops out the same result as above.
Jake Robert
15-Jul-15 23:00pm
View
I have searched some codes and tutorials and this is what I have as of now.
Imports System.Data.OleDb
Public Class Search
Dim con As New OleDbConnection
Private Sub Search_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'DatabaseDataSet.Association' table. You can move, or remove it, as needed.
Me.AssociationTableAdapter.Fill(Me.DatabaseDataSet.Association)
'TODO: This line of code loads data into the 'DatabaseDataSet.Sector' table. You can move, or remove it, as needed.
Me.SectorTableAdapter.Fill(Me.DatabaseDataSet.Sector)
cmboxExportOpt.Text = "Export to PDF"
' Filling the tree view
Dim SectorID As String
Dim SectorName As String
Dim SectorCount As Integer
For SectorCount = 0 To DatabaseDataSet.Sector.Count - 1
SectorID = DatabaseDataSet.Sector.Rows(SectorCount).Item(0)
SectorName = DatabaseDataSet.Sector.Rows(SectorCount).Item(1)
tvDataTable.Nodes(0).Nodes.Add(SectorID, SectorName)
Next
tvDataTable.ExpandAll()
End Sub
Private Sub btnBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBack.Click
Me.Close()
Homepage.Show()
End Sub
Private Sub tvDataTable_AfterSelect(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles tvDataTable.AfterSelect
If tvDataTable.SelectedNode Is Nothing Then
dgvAssocView.DataSource = Nothing
Exit Sub
End If
If tvDataTable.SelectedNode.Name = "Sector" Then
Exit Sub
End If
Dim ID As String
ID = tvDataTable.SelectedNode.Name
dgvAssocView.DataSource = DatabaseDataSet.Association.Select("SectorID=" & ID)
End Sub
Private Sub SectorBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Me.Validate()
Me.SectorBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.DatabaseDataSet)
End Sub
End Class
I can only show 1 data table(Which is Sector) in the tree view and I cannot add some grandchild to the child(Association) nodes of the parent node.
Also I am getting errors like this:
Syntax error in Lookup expression: Expecting keyword 'Parent' followed by a single column argument with possible relation qualifier: Parent[(<relation_name>)].<column_name>.
Jake Robert
15-Jul-15 4:13am
View
Actually, I am stuck at all. I do not know how to start. I can't even connect the treeview to my database's datatable. So any enlightenment into this matter is highly appreciated.
Jake Robert
15-Jul-15 3:15am
View
Yes, I do want my datatable to be displayed
The actual treeview hierarchy that I will be doing is like this, Sector>Association>Company>Location>Product>Raw Materials. So 1 Parent will be having multiple sub-parents and child.
Show More