Hi All,
Please see the code below:
on the messagebox everything is coming other than the value of vencode. where am I going wrong. In the database vendor_code datatype is nvarchar(50).Code:Dim vencode As String conn.Open() Dim cmdvenstr As String = "Select vendor_code from tbl_vendor where vendor_name='" & cmbVendor.Text.Trim() & "'" Dim cmdven As New SqlCommand(cmdvenstr, conn) vencode = cmd.ExecuteScalar() MessageBox.Show(vencode, "IG", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1)




Reply With Quote