Skip to main content

Posts

Trigger INSERT & DELETE From 2 Different Database Server

TRIGGER INSERT : create trigger [dbo].[trigger name] on [dbo].[table name 1st] after INSERT as begin insert into [IP Address destination server].[2nd database name].[dbo].[table name 2nd] select [Material]       ,[MaterialDescr]       ,[MatlGroup]       ,[Createdby] from inserted end TRIGGER DELETE : create trigger [dbo].[trigger name] on [dbo].[table name 1st] for DELETE as declare @ID varchar(15) SET @ID = (select [Material] from deleted) begin delete from [IP Address destination server].[2nd database name].[dbo].[table name 2nd]  where MATERIAL = @ID end

Query Timeout Expired

add below script !!!! on your query SQLDataAdapter.SelectCommand.Timeout = 0

AVOID DUPLICATE ENTRY TO DATATABLE

 Dim Temukan As DataRow() = DTSumPO.Select("PONUM ='" & vPO & "' AND POQTY = '" & vQTY & "'")                                         If Temukan.Length = 0 Then                                             DTSumPO.Rows.Add(vPO, vQTY)                                         End If

SUM QTY FROM DATATABLE VB.NET

Dim DTGakGeser, DTGeser As New DataTable                                 DTGakGeser.Columns.Add("COGAKGESER", GetType(String))                                 DTGakGeser.Columns.Add("QTYGAKGESER", GetType(Decimal))                                 DTGeser.Columns.Add("COGESER", GetType(String))                                 DTGeser.Columns.Add("QTYGESER", GetType(Decimal))                                 Dim tmpSUMGakGeser, tmpSUMGeser             ...

error 11 could not copy exceeded retry count of 10. failed

My case in VS2013 Open project properties [ menu > project > properties ] Choose "debug" tab Uncheck "Enable the visual studio hosting process" Start debugging [F5] You will receive security warning , just "ok". Lets application running Stop debugging. Check option "Enable the visual studio hosting process" , under debug tab, Now , try to start debugging , you will not see error again source :  https://stackoverflow.com/questions/18102859/visual-studio-could-not-copy-during-build

CHECK CHECKBOX IN DATAGRIDVIEW IS CHECKED OR UNCHECKED

'CHECK CHECKBOX IS CHECKED OR UNCHECKED     Private Sub CB_CheckedChanged(sender As Object, e As EventArgs) Handles CB.CheckedChanged         With DgvDoc             If CB.CheckState = CheckState.Checked Then                 For iRow = 0 To .Rows.Count - 1                     .Rows(iRow).Cells("CHECKED").Value = True                 Next             Else                 For iRow = 0 To .Rows.Count - 1                     ....