Hi
This is the code inserting json data into mssql database
Dim url As String = "http://localhost/delivery/JsonData/WebService.asmx/GetAllCustomer"
ServicePointManager.Expect100Continue = True
ServicePointManager.SecurityProtocol = CType(3072, SecurityProtocolType)
Dim json As String = (New WebClient).DownloadString(url.TrimEnd())
Dim res As List(Of BouncesAndBlocks) = JsonConvert.DeserializeObject(Of List(Of BouncesAndBlocks))(json)
For Each bouncesAndBlock In res
Dim cmd As New SqlCommand
cmd.Connection = conn
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "usp_API_Customer_List"
cmd.Parameters.Add(New SqlParameter("@Action", "INSERT"))
cmd.Parameters.AddWithValue("@code", bouncesAndBlock.code)
cmd.Parameters.AddWithValue("@Name", bouncesAndBlock.name)
cmd.Parameters.AddWithValue("@type", bouncesAndBlock.type)
cmd.Parameters.AddWithValue("@transporter", bouncesAndBlock.transporter)
Dim da As New SqlDataAdapter(cmd)
Dim dt As New DataTable
da.Fill(dt)
cmd.Parameters.Clear()
cmd.Dispose()
Next