• Member Avatar for Hardz
    Hardz

    Replied To a Post in Get single number of a whole number

    Hi Zelrick, I just thought that the data that you had provided is in a standard form that consists of 5 digits numerical number. Yes of course an error would …
  • Member Avatar for Hardz
    Hardz

    Replied To a Post in how to move rows from one datagridview to another in vb

    @zelrick: Thanks for the code that you have provided. @teze: Hi, How is it going so far? Do you still having trouble loading dgv value to a dgv to other …
  • Member Avatar for Hardz
    Hardz

    Replied To a Post in how to move rows from one datagridview to another in vb

    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
    Hardz

    Replied To a Post in Merging content of two rows into one

    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 …
  • Member Avatar for Hardz
    Hardz

    Replied To a Post in How to seclet Date from database

    Hi, The above sample code is not safe and prone to sql injection. By using a parameterized query: Dim idate As String = "07/03/2015" Dim query As String = "SELECT …
  • Member Avatar for Hardz
    Hardz

    Replied To a Post in How to seclet Date from database

    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 …
  • Member Avatar for Hardz
    Hardz

    Replied To a Post in Delimited Text File to Excel using vb.net

    Hi, Just apply the new code to your button click event and remove/comment the old one and see what happened. Because just as I told a while ago, that the …
  • Member Avatar for Hardz
    Hardz

    Replied To a Post in Delimited Text File to Excel using vb.net

    Hi, I don't know if this code would help, but process.start won't work against delimeted text. Unless, if you use this method: [Workbooks.OpenText](https://msdn.microsoft.com/en-us/library/office/ff837097.aspx). Dim ExcelApp As New Excel.Application ExcelApp.Visible = …
  • Member Avatar for Hardz
    Hardz

    Replied To a Post in Search timeout

    yes, as jwenting said 2K records are very small, compare to approximately 20M records that our(company) table holds (the audit trail/history table).I have no problem querying this table because it …
  • Member Avatar for Hardz
    Hardz

    Replied To a Post in Delimited Text File to Excel using vb.net

    Hi, The sample code above indicates a separate path for text file and excel file. Where in the text file was located based on your sample at C:\Users\abcde\Desktop\anothertest.txt, while I …
  • Member Avatar for Hardz
    Hardz

    Replied To a Post in Search timeout

    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 …
  • Member Avatar for Hardz
    Hardz

    Replied To a Post in Delimited Text File to Excel using vb.net

    try remove the $ sign, and create a new excel file, use "sheet1" as default sheet name.
  • Member Avatar for Hardz
    Hardz

    Replied To a Post in Delimited Text File to Excel using vb.net

    A little tweak using your code, which resulted on the following: Dim APP As New Excel.Application Dim worksheet As Excel.Worksheet Dim workbook As Excel.Workbook Private Sub Button2_Click(sender As System.Object, e …
  • Member Avatar for Hardz
    Hardz

    Replied To a Post in Delimited Text File to Excel using vb.net

    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 …
  • Member Avatar for Hardz
    Hardz

    Replied To a Post in Print all report with one command

    Private Sub BtnPrint_Click(sender As System.Object, e As System.EventArgs) Handles BtnPrint.Click If String.IsNullOrEmpty(Page2Combobox.Text) Then PrintDocument1.Print() 'MessageBox.Show("Printed document1") PrintDtTextBox.Text = DateTimePicker1.Text Me.PrintStatusTextBox.Text = Label1.Text Else 'if not empty then print document1 and …
  • Member Avatar for Hardz
    Hardz

    Replied To a Post in select one field from a table in sql

    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 Hardz
    Hardz

    Replied To a Post in Print all report with one command

    Hi, try this: Private Sub BtnPrintAll_Click(sender As System.Object, e As System.EventArgs) Handles BtnPrintAll.Click For i As Integer = 0 To VerifiedHPReportDataGridView.Rows.Count - 2 'print row/s and remove one by one. …
  • Member Avatar for Hardz
    Hardz

    Replied To a Post in Get single number of a whole number

    Hi, Sorry, I misunderstood the problem, an apology to you guys especially for zelrick. :). I never thought that the given data in excel is per cell, I just thought …
  • Member Avatar for Hardz
    Hardz

    Replied To a Post in Get single number of a whole number

    Hi, I have no problem running this code without error. Maybe you can try this sample data and save it on new excel file, then run and let's see if …
  • Member Avatar for Hardz
    Hardz

    Replied To a Post in Get single number of a whole number

    Hi, are you sure that all of your data in excel have this kind of format: 'xxxxx xxxxx xxxxx xxxxx xxxxx'. Because if not that error will occur.
  • Member Avatar for Hardz
    Hardz

    Replied To a Post in Get single number of a whole number

    Hi, > Am I wrong to make the ("ColumnName") to (0)? changing it to 0 is a right way, knowing that row 1 at you excel file has no direct …
  • Member Avatar for Hardz
    Hardz

    Replied To a Post in login form connected to the database(microsoft sql server)

    @shark: yes, you are right, the one that I have provided causes a code redundancy which I didn't notice. :) Thanks... @chris: I think you just need to join the …
  • Member Avatar for Hardz
    Hardz

    Replied To a Post in Print all report with one command

    Since you are using a typed dataset, you just need to modify your dgv Design name. Right click to your dgv and select edit columns, or from Properties menu, select …
  • Member Avatar for Hardz
    Hardz

    Replied To a Post in Get single number of a whole number

    Hi Zelrick, Yes, ddanbe's suggestion is right: "I would rather process one excel cell, instead of first reading in a whole excel row and concatenating the cell values as string …
  • Member Avatar for Hardz
    Hardz

    Replied To a Post in login form connected to the database(microsoft sql server)

    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 …
  • Member Avatar for Hardz
    Hardz

    Replied To a Post in Get single number of a whole number

    Sorry, I thought I'm in a c# thread.. :) Dim exdata As String() = {"98321 12345 67890 54321 09876", "89123 51234 06789 15432 60987"} For Each value As String In …
  • Member Avatar for Hardz
    Hardz

    Replied To a Post in Get single number of a whole number

    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 …
  • Member Avatar for Hardz
    Hardz

    Replied To a Post in Print all report with one command

    Hi Satyam, yes this code is working based on your requirements. But I have made a modification of the code to follow the requirements based on my understanding. So using …
  • Member Avatar for Hardz
    Hardz

    Replied To a Post in Print all report with one command

    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, …
  • Member Avatar for Hardz
    Hardz

    Replied To a Post in datagridview

    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 …

The End.