Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~5K People Reached
Favorite Forums
Member Avatar for Fangling

Hi i have a datatable which looks like: Modulecode AdminNo EG1001 111411H 111380Y 192029B EG1002 110970R 102938X ... populated in a dgv. How to i get: Modulecode NumofStudents AdminNo EG1001 3 111411H 111380Y 192029B <<<<<<<<<<Blank>>>>>>>>>>>>>>>>>>>>>> EG1002 2 110970R 102938X <<<<<<<<>>>>>>>>>>>>>>>>>>>>>> . . . My codes are: ''Connections Dim connect As …

Member Avatar for ss125
0
130
Member Avatar for Fangling

hi can anyone tell me how do i put load linq query into datatable then populate into datagridview? my codes are as follows: Dim dt As New DataTable '' Create 3 typed columns in the DataTable. dt.Columns.Add("ConflictingPaper", GetType(String)) dt.Columns.Add("Numberofstudents", GetType(String)) dt.Columns.Add("AdminNo", GetType(String)) 'Dim query1 = (From a In dt3 Group …

Member Avatar for kRod
0
231
Member Avatar for Fangling

Dim connect As String connect = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" & Application.StartupPath & "\segdata.accdb" Dim conn As New OleDbConnection(connect) Dim sr As System.IO.StreamReader Dim entirefile As String sr = File.OpenText(Application.StartupPath & "\SEG1.txt") entirefile = sr.ReadToEnd() ' Read the whole file Dim OriginalValue As String OriginalValue = vbTab Dim ReplaceValue As String …

Member Avatar for Oxiegen
0
276
Member Avatar for Fangling

Hi i have a datatable, dt3 showing: adminno paperno 111411H 4 111411H 9 182938C 2 192839A 3 111380Y 26 111380Y 36 111380Y 40 182737N 26 182737N 40 i want to populate: conflictingpaper numberof students adminno 4:9 1 111411H 26:40 2 111380Y 182737N ... .. .... ... i have these codes: …

Member Avatar for ss125
0
241
Member Avatar for Fangling

Hi, i have these codes: Dim dt3 As New DataTable dt3.Columns.Add("AdminNo", GetType(String)) '/*Add column AdminNo dt3.Columns.Add("PaperNo", GetType(Integer)) Dim curmodule As String = String.Empty For Each dr1 As DataRow In dt1.Rows curmodule = dr1("ModuleCode").ToString For Each dr2 As DataRow In dt2.Rows Dim found As Boolean found = False For i As …

Member Avatar for Fangling
0
973
Member Avatar for Fangling

Hi i have a datatable, dt3 showing: adminno paperno 111411H 4 111411H 9 182938C 2 192839A 3 111380Y 26 111380Y 36 111380Y 40 182737N 26 182737N 40 i want to populate: conflictingpaper numberof students adminno 4:9 1 111411H 26:40 2 111380Y 182737N ... .. .... ... i have these codes: …

Member Avatar for Fangling
0
225
Member Avatar for Fangling

Hi, can anyone tell me whether im storing my data into list<of T> correctly? My codes are as follows: Dim connect As String connect = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" & Application.StartupPath & "\segdata.accdb" Dim conn As New OleDbConnection(connect) Dim cmd As OleDbCommand = New OleDbCommand cmd.Connection = conn conn.Open() cmd.CommandText = …

Member Avatar for Begginnerdev
0
248
Member Avatar for Fangling

hi i have these codes: Dim dt As New DataTable ' Create four typed columns in the DataTable. dt.Columns.Add("ConflictingPaper", GetType(String)) dt.Columns.Add("Numberofstudents", GetType(Integer)) dt.Columns.Add("AdminNo", GetType(String)) Dim query1 = (From a In dt3 Group CStr(a.Field(Of Integer)("PaperNo")) By AdminNo = (a.Field(Of String)("AdminNo")) Into Group Select dt.LoadDataRow(New Object() {String.Join(":", Group.ToArray()), Group.Count(), AdminNo}, False)).ToList().Count() DataGridView3.AutoGenerateColumns …

0
93
Member Avatar for Fangling

Hi, i have this datatable dt3 which looks like: ADminNo PaperNo 111411H 3 111411H 18 172828z 3 172828z 18 111380Y 93 111938S 10 How to i get something like: ConflictingPaper Numberofstudents AdminNo 3 : 8 2 111411H 172828z so on and so forth. to populate in a datagridview. i tried …

Member Avatar for Fangling
0
113
Member Avatar for Fangling

Hi, i have this query: cmd.CommandText = "SELECT DISTINCT PaperNo,ModuleCode1,ModuleCode2,ModuleCode3, ModuleCode4, ModuleCode5, ModuleCode6, ModuleCode7, ModuleCode8, ModuleCode9 FROM(PapersList)ORDER BY PaperNo ASC" and i have this code to loop: Dim dt3 As New DataTable dt3.Columns.Add("AdminNo", GetType(String)) '/*Add column AdminNo dt3.Columns.Add("PaperNo", GetType(Integer)) Dim curmodule As String = String.Empty For Each dr2 As DataRow …

Member Avatar for Fangling
0
2K
Member Avatar for Fangling

i have dt1 from a query cmd.CommandText = "SELECT DISTINCT AdminNo, ModuleCode FROM(SEGDATA)ORDER BY AdminNo ASC, ModuleCode ASC" Dim dt1 As New DataTable dt1.Load(cmd.ExecuteReader) DataGridView1.AutoGenerateColumns = True DataGridView1.DataSource = dt1 another query dt2 cmd.CommandText = "SELECT DISTINCT PaperNo,ModuleCode1,ModuleCode2,ModuleCode3, ModuleCode4, ModuleCode5, ModuleCode6, ModuleCode7, ModuleCode8, ModuleCode9 FROM(PapersList)ORDER BY PaperNo ASC" Dim dt2 …

Member Avatar for Fangling
0
136
Member Avatar for Fangling

hi, i have a datagrid which looks like: subject students eg1001 182737H 29837B 29837C 19282W eg1002 192837C 32810H so on and so forth. how can i do a counter and put into a column between subject and students? like: subject numberofstudent students eg1001 4 182737H 29837B 29837C 192823W eg1002 2 …

Member Avatar for Fangling
0
236
Member Avatar for Fangling

list i have: School,campus,adminno,modulecode,modulegroup SEG AMK 101427Y EG3902 EG3902-G1 SEG AMK 101427Y EGS650 EGS650-G1 SEG AMK 103852S EG3901 EG3901-G1 SEG AMK 103852S EG3904 EG3904-G1 SEG AMK 103852S EGS104 EGS104-G1 SEG AMK 103852S EGS650 EGS650-G1 SEG AMK 106581C EG3901 EG3901-G1 SEG AMK 106581C EG3902 EG3902-G1 SEG AMK 111713M EG3901 EG3901-G1 SEG …

Member Avatar for Fangling
0
104
Member Avatar for Fangling

Hi, i have a database with the following details: SCHOOL CAMPUS ADMINNO MODULECODE MODULEGRP SEG AMK 100810R EG3932 EG3932-G1 SEG AMK 100810R EG3933 EG3933-G1 SEG AMK 101427Y EG3901 EG3901-G1 SEG AMK 101427Y EG3902 EG3902-G1 SEG AMK 101427Y EGS650 EGS650-G1 SEG AMK 103852S EG3901 EG3901-G1 SEG AMK 103852S EG3904 EG3904-G1 now …

Member Avatar for Fangling
0
200
Member Avatar for Fangling

i have an excel file which contains the following: (only part of the file) 1 SEG-AMK EG1832 Mechanics and Materials 286 1.5 EG1832 2 SEG-AMK EG1833 Electrical Principles 375 1.5 EG1833 EG1952 EG1903 3 SEG-AMK EG1835.1 Engineering Mathematics (1) 456 1.5 EG1835 EG1001 4 SEG-AMK EG1835.2 Engineering Mathematics (2) 363 …

Member Avatar for Fangling
0
202
Member Avatar for Fangling

i have a database table containing: SEG,AMK,101427Y,EG3902,EG3902-G1 SEG,AMK,101427Y,EGS650,EGS650-G1 SEG,AMK,103852S,EG3901,EG3901-G1 SEG,AMK,103852S,EG3904,EG3904-G1 SEG,AMK,103852S,EGS104,EGS104-G1 SEG,AMK,103852S,EGS650,EGS650-G1 SEG,AMK,106581C,EG3901,EG3901-G1 SEG,AMK,106581C,EG3902,EG3902-G1 SEG,AMK,111713M,EG3901,EG3901-G1 SEG,AMK,111713M,EG3902,EG3902-G1 another table containing: 1 SEG-AMK EG1832 Mechanics and Materials 286 1.5 EG1832 2 SEG-AMK EG1833 Electrical Principles 375 1.5 EG1833 EG1952 EG1903 3 SEG-AMK EG1835.1 Engineering Mathematics (1) 456 1.5 EG1835 EG1001 4 SEG-AMK …

0
95