Adding a new empty row onto a Datagridview

Hello all
I have a form with two datagridviews.
Grid A is polulated with orders from DB, grib B has an empty table with the same column name as grid A.
Im currently draging orders from Grid A onto grid B.
My isue is that since grid B has only one empty row, it only alows to drag one item.
What I want to accomplish is to add an empty row in grid B In index 0 (the firsst row)
In the dragdrop event I tried to add an empty row, but this code inserts an empty row before the firtst row that was added

Private Sub DGV_Pulled_DragDrop(sender As Object, e As DragEventArgs) Handles DGV_Pulled.DragDrop Dim RowsSource As Integer = Convert.ToInt32(e.Data.GetData(Type.GetType("System.Int32"))) Dim clientPoint As Point = Me.DGV_Pulled.PointToClient(New Point(e.X, e.Y)) Dim hit As DataGridView.HitTestInfo = Me.DGV_Pulled.HitTest(clientPoint.X, clientPoint.Y) If hit.Type = DataGridViewHitTestType.Cell Then DGV_Pulled.Rows(hit.RowIndex).Cells(hit.ColumnIndex).Value = DGV_Orders.Rows(RowsSource).Cells("oe").Value DGV_Pulled.Rows(hit.RowIndex).Cells(hit.ColumnIndex + 1).Value = DGV_Orders.Rows(RowsSource).Cells("Address").Value Dim order As String = DGV_Orders.Rows(RowsSource).Cells("OE").Value End If Dim row As New DataGridViewRow With row .CreateCells(DGV_Pulled) .Cells(0).Value = DBNull.Value End With Me.DGV_Pulled.Rows.Add(row) End Sub

Crystal report sp21 and sp29

Hello
I have created awhile ago in VS2017 an application [application A] with CR sp21 which works fine.
Now Ihave another application [application B] created in vs2019 with CR sp29.
When I install app B on the same pc where App A is installed the CR wont work so I installed CR runtime sp29 and app B works, but app A returns an error see attach.
How can I have both app working.

S_image.png

reference to AxXtremeCalendarControl

Hi all
I Have a CalendarvProject with a 3rd party Calendar control.
the application was working fine untill I upgraded the Calendar Control .
When I opened the solution two references were no longer availabe, so I had errors.
One of the references was ExtremeCalenderControl the other AxXtremeCalendarControl.
I was able to find the ExtremeCalenderControl but can't seem to find ExtremeCalenderControl.
I contacted support for the Calender Control but they said they weren't responsible with what Microsoft does.
So I need help to where can I find this reference.
Thank you in advance.

How To Update A Cell Based On DagridviewCombobox Selected Item

Hi all
I have a datagridview with 2 columns.
fist column is Datagridview combobox the second is a datagridtextbox.
I'm trying to fill the second column based on the combobox selection .
The Method that captures the selected item does not track which row is being edited.
I have tried using the Mouse up and Cell edit events but they were unsuccessful.
This is the code that I use to capture which item has been selected.

Private Sub DGV_LinesItem_EditingControlShowing(ByVal sender As System.Object, ByVal e As DataGridViewEditingControlShowingEventArgs) Handles DGV_LinesItem.EditingControlShowing
        Dim editingComboBox As ComboBox = e.Control
        AddHandler editingComboBox.SelectedIndexChanged, AddressOf Me.editingComboBox_SelectedIndexChanged
    End Sub
    Private Sub editingComboBox_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
        If IsNumeric(CType(sender, ComboBox).SelectedValue) Then
            Me.Selecteditem = CType(sender, ComboBox).SelectedIndex
        End If
    End Sub

Endless loop in mysql function

Hello all.
I have a funtion in MYSQL to substruct days from a date.
This function seamsto work but some dates it times out.
This is my function

CREATE DEFINER=`root`@`localhost` FUNCTION `Calculater`(intrval int, req date) RETURNS date
    DETERMINISTIC
BEGIN
declare calculated date;
declare added int default  0;

Lbl_Loop: Loop
IF added=intrval then
leave lbl_loop;
End IF;
set calculated = DATE_SUB(req,interval 1 day);
IF weekday(calculated)<5  then
set added= added+1;
End If;
end loop;
RETURN calculated;
END

If I do select Calculater(1,"2020-02-04"); it works, but select Calculater(1,"2020-02-02"); it runs for a few seconds and My SQL times out.

Thanks in advance.

server time out while connectiong via ssl

This application was sending out orders without errors when smtp wasn't secured.
Now the clients webmail server was changed to ssl.
After making the changes the server times out.
I did some research and found this .ConnectType = SmtpConnectType.ConnectSSLAuto
I'm anable to assign the SmtpServer.ConnectType = SmtpConnectType.ConnectSSLAuto.

This is my code.

Dim SmtpServer As New SmtpClient()
        Dim mail As New MailMessage()
            SmtpServer.UseDefaultCredentials = False
            SmtpServer.Credentials = New Net.NetworkCredential(jonDoe@Domain.com, srvPass)
            SmtpServer.Port = 465
            SmtpServer.Host = mail.Domain.com
            SmtpServer.EnableSsl = true
            mail = New MailMessage With {.From = New MailAddress(frome)
        }
            mail.To.Add(Too)
            mail.Subject = Subject
            mail.Body = InputBox("Enter the body here", "Body")
            For Each Row In attch_tbl.Rows
                OE_File = Row("OE").ToString.TrimStart("0c")
                OE_File = "*" & OE_File & "*"
                For Each foundFile As String In My.Computer.FileSystem.GetFiles("N:\",
        Microsoft.VisualBasic.FileIO.SearchOption.SearchTopLevelOnly, OE_File)
                    If foundFile <> "" Then
                        mail.Attachments.Add(New Attachment(foundFile))
                        FileNum = FileNum + 1
                    End If
                Next
            Next
            If FileNum >0 Then
                SmtpServer.Send(mail)
               end if

Cannot open database (Unknown)

Hi all
I have a x32 bit application on a windows10 x64 machine.
The application was working fine untill I change the connection string from OLEDB to ODBC with a DSN.
Since my application x32 bit I created a x32 bit DSN to an ACCESS db wich also is a x32 (Office 365).
When I run the application I receive the error, cannot open database (Unknown) it may not be a database that your application recognizes.
I can oppen the Database from Access fine no pronblem, I also recreated the 32bit DSN dultiple times and the problem still precistes.