Skip to main content

Posts

Showing posts from 2018

Small Function VB.Net & C#

VB C # UBound () = yourArray . GetUpperBound ( 0 ) or yourArray . Length for one - dimesional arrays LBound () = yourArray . GetLowerBound ( 0 ) IsNothing () = Object . ReferenceEquals ( obj , null ) Chr () = Convert . ToChar () Len () = "string" . Length UCase () = "string" . ToUpper () LCase () = "string" . ToLower () Left () = "string" . Substring ( 0 , length ) Right () = "string" . Substring ( "string" . Length - desiredLength ) RTrim () = "string" . TrimEnd () LTrim () = "string" . TrimStart () Trim () = "string" . Trim () Mid () = "string" . Substring ( start , length ) Replace () = "string" . Replace () Split () = "string" . Split () Join () = String . Join () MsgBox () = MessageBox . Show () IIF ()

Combined Multiple Rows Data Into One Row In SQL

this is the source for doin that. https://stackoverflow.com/questions/31211506/how-stuff-and-for-xml-path-work-in-sql-server

Trouble While Running Visual Studio (the operation could not be completed. the process cannot access the file because it is being used by another process.)

If you meet this message : uncheck below marked :

How To Handle Double Or String

                                    Dim Cek_vRATIO As Double                                     If Double.TryParse(vRATIO, Cek_vRATIO) Then                                         .EstimateRatio = Cek_vRATIO                                     Else                                         .EstimateRatio = 0                                     End If

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