alter proc test @hed_fact xml as select r.c.value('(person)[1]','varchar(6)') from @hed_fact.nodes('/row')r(c)
string hed_xml = "<row><person>000590</person></row>"; SqlConnection conn = new SqlConnection(connectionStr.conn("sg")); SqlCommand cmd = new SqlCommand(); cmd.CommandText = "test"; cmd.CommandType = CommandType.StoredProcedure; cmd.Connection = conn; cmd.Parameters.AddWithValue("@hed_fact", hed_xml); if(conn.State==ConnectionState.Closed) conn.Open(); string res = cmd.ExecuteScalar().ToString(); conn.Close(); cmd.Dispose(); Button1.Text = res;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)