Posts
 
Reputation
Joined
Last Seen
Ranked #2K
Strength to Increase Rep
+3
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
4
Posts with Upvotes
3
Upvoting Members
2
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
0 Endorsements
Ranked #2K
~12.3K People Reached
About Me

C# Programmer

Interests
Programming, web browsing, blogging, playing computer games, playing guitar, singing, cooking.
PC Specs
Core 2 duo
Favorite Forums
Favorite Tags
Member Avatar for 21303359

Hi, I think these links will help you on how to use a select statement: [msdn](https://msdn.microsoft.com/en-us/library/ms187731.aspx), [w3schools](http://www.w3schools.com/sql/sql_select.asp)

Member Avatar for Purvi_1
0
439
Member Avatar for Satyam_1

Hi Satyam, if my understanding is correct maybe you can try this code: Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Dim col1 As String, col2 As String, col3 As String 'if dgv is autogenerated For i As Integer = 0 To DataGridView1.Rows.Count - 2 'print row/s and …

Member Avatar for zelrick
0
278
Member Avatar for zelrick

Hi zelrick, ddanbe provided you a great answer (link) to your problem. string[] exdata = { "98321 12345 67890 54321 09876", "89123 51234 06789 15432 60987" }; foreach (string value in exdata) { dataGridView1.Rows.Add(value.Substring(0, value.Length - 27), value.Substring(2, value.Length - 26), value.Substring(12, value.Length - 28), value.Substring(13, value.Length - 26)); } …

Member Avatar for zelrick
0
699
Member Avatar for teze

Hi, What have you done so far? Is your dgv a databound or not? Anyway, please see this link on [passing value from dgv to another.](https://www.daniweb.com/software-development/vbnet/threads/341565/passing-value-from-datagridview-to-another) Hardz

Member Avatar for Hardz
0
2K
Member Avatar for scomrade

Hi, Since you don't have a column that references the date field and analysis header field, you have to manually create a reference for these two fields. For this sample I created an autogenerated number labeled as Category that would references the two, then combined using union clause. ;with cte …

Member Avatar for Hardz
0
140
Member Avatar for hwoarang69

Hi, I think the better way to query a date from MS access database is to use a range or between operator. Dim idate As String = "07/03/2015" 'using range Dim query As String = "SELECT DISTINCT * FROM workStartTable WHERE StartBy Between #" & idate & "# And #" …

Member Avatar for Hardz
0
214
Member Avatar for Mike_25

Hi, You have to properly dipose the connection string and the Sql command to avoid memory leak, please see this link: [Disposing Sql Connection](http://stackoverflow.com/questions/61092/close-and-dispose-which-to-call). And be sure to use a parameterized query to avoid [Sql Injection](http://www.w3schools.com/sql/sql_injection.asp) Dim con As New SqlClient.SqlConnection("Server=.\SQLEXPRESS;Initial Catalog=RCS;Integrated Security=True") Dim cmd As New SqlCommand() Try con.Open() …

Member Avatar for Mike_25
0
186
Member Avatar for zelrick

Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click workbook = APP.Workbooks.Open(lblPath.Text) 'path of excel file worksheet = workbook.Worksheets("sheet1") Dim i As Integer = 1 ' Split string based on spaces. ' using textbox1 for your text input for example, just put this character to textbox1: 12345 12345 abcde …

Member Avatar for zelrick
0
5K
Member Avatar for Christopher_12

Hi Christopher, Use an indicator as departmentId so that you can login to either department1 or department2. And use parameterized query to avoid sql injection attack. Private strCon As String = "Data Source=IT-Hardz\SqlExpress;Initial Catalog=CGHMS;Integrated Security=True " Private Sub btnLogIn_Click(sender As System.Object, e As System.EventArgs) Handles btnLogIn.Click Dim cmd As New …

Member Avatar for Hardz
0
998
Member Avatar for prince_11

Hi Prince, If I understand you correctly maybe this link can help you: https://social.msdn.microsoft.com/Forums/vstudio/en-US/72bee14b-53d7-4a62-a6a0-381aeb8ef14b/copy-datagridview1-data-to-datagridview2 https://social.msdn.microsoft.com/Forums/en-US/8c4c8eda-10b5-4393-84c8-418ada34ae98/copy-selected-rowscells-from-one-datagridview-to-another or using this sample code: Public Class Form1 Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load initializeDgv1() initializeDgv2() End Sub Dim tableOfDgv1, tableOfDgv2 Private Sub initializeDgv1() tableOfDgv1 = New DataTable() tableOfDgv1.Columns.Add("Dgv1_Column1") tableOfDgv1.Columns.Add("Dgv1_Column2") dataGridView1.DataSource …

Member Avatar for Hardz
0
212
Member Avatar for Hardz

Hi, I am using c# to update and view the student_Teacher simple database in sql. I used textboxes with binding navigator to view and update the teachers info and datagridview for the students, so 1 teacher per many students is the output. I have no problem for searching, editing and …

Member Avatar for Hardz
0
353
Member Avatar for Hardz

Hello, How do i select or set the focus of a particular cell in a datagridview? Actually, this problem is simple but it is hard for me to solve it coz i'm only a beginner in c#. So here is my sample list of students as shown below: [COLOR="Green"]Ann[/COLOR] Antoinette …

Member Avatar for Hardz
0
954
Member Avatar for Hardz

H! There! I have a problem in c# that require sorting of names of students in a sql database and i want it to be specific, i used data grid view to view the data of the students as shown below: Students First Name: Ann Antoinette Bernadette Brenda Jeannette Judith …

Member Avatar for Hardz
0
116
Member Avatar for Hardz

I am using this code in C# as shown below, to view the students first name. studentsBindingSource.filter = "[First Name] like '%" + txtFirstName.text + "%'"; This code is very useful and working well. If i input at a textbox for example, a letter [M] or abbreviations, all the students …

Member Avatar for Hardz
0
362
Member Avatar for Hardz

I am using treeview in c# with checkboxes in each node as shown below: +[]Department []Dept1 []Dept2 I am having trouble to remove the checkbox at department node, Is there a way to remove it coz it is not necessary to have a checkbox there without affecting the checkboxes at …

Member Avatar for hirenpatel53
0
80
Member Avatar for Hardz

I am using treeview with checkboxes in each node as shown below: +[]Main []Child1 []Child2 I have an indicator from form1 which is checkbox1 and checkbox2 that is uses to control the checkboxes of child1 and 2. If checkbox1 is true automatically child1 will be true, and if checkbox2 is …

Member Avatar for Hardz
0
255
Member Avatar for Hardz

I have 3 computers connected to each other, pc1 is the server while pc2 and pc3 are clients. I created a windows application using c# and MS sql server as database at pc2 where in the sql server was installed, anyway, i didn't installed sql at pc1 server coz of …

Member Avatar for Hardz
0
173
Member Avatar for Hardz

I am a c# and MSSql Server beginner, one of the project that i created is the library system database, I used MSSql Server as my database and c# as my interface. I have no problem to run that application coz it runs smoothly and better without any error. One …

Member Avatar for powerbox
0
100