I will try again but same thing is happen
Dim insql As String = "INSERT INTO patient (recpno,name,age,phone,date,refby,address,testcode,testname,amount) VALUES (@number1,@text2,@number3,@text4,@text5,@number6,@text7,@text8,@text9,@number10)"
Dim cmd As SqlCommand = New SqlCommand(insql, sqlconn)
Try
sqlconn.Open()
cmd.Parameters.AddWithValue("@number1", recieptxt.Text)
cmd.Parameters.AddWithValue("@text2", nametxt.Text)
cmd.Parameters.AddWithValue("@number3", agetxt.Text)
cmd.Parameters.AddWithValue("@text", addresstxt.Text)
cmd.Parameters.AddWithValue("@text5", datetxt.Text)
cmd.Parameters.AddWithValue("@number6", phonetxt.Text)
cmd.Parameters.AddWithValue("@text7", refbytxt.Text)
cmd.Parameters.AddWithValue("@text8", testcodetxt.Text)
cmd.Parameters.AddWithValue("@text9", testnametxt.Text)
cmd.Parameters.AddWithValue("@number10", amounttxt.Text)
Dim rowsins As Double = cmd.ExecuteNonQuery
sqlconn.Close()
Catch ex As Exception
MessageBox.Show(rowsins.ToString & rowsins.ToString & " row added")
End Try
End Sub