title: Query bindings with Wpf
body: <p>im new to database and programming at all, but i have a problem.
  I want to open a xml file and load it into my database.
  My program use the openfileDialog and i do it through a binding.</p>
  <pre><code>private string _pathselected;
  public string pathselected 
  {
      get 
      {
          return _pathselected;
      }
      set 
      {
          pathselected = value;
          OnPropertyChanged(&quot;pathselected&quot;);
      }
  }
  </code></pre>
  <p>this is the string i bind to using the openFileDialog</p>
  <pre><code>OpenFileDialog openFileDialog = new OpenFileDialog();
  
  openFileDialog.Filter = &quot;xml files(*.xml) | *.xml | All files(*.*) | *.* &quot;;
  
  if (openFileDialog.ShowDialog() == true) {
      pathselected = openFileDialog.FileName;
  
  }
  </code></pre>
  <p>Everything works and i used it multiple times to acces it in xaml for a datagrid or whatsoever.
  In theory i want to use the pathselected binding  in query. do i have to bind it again or what, im out of clues and dont know what i have to sarch for. And im sure i cant just use the already existing bindig without binding it to query first.</p>
  <p>right now my query looks like this</p>
  <pre><code>select cast(c as xml) from
  openrowset(bulk 'C:\Users\Username\Desktop\test.xml' , single_blob) as T(c)
  </code></pre>
  <p>and i want the path to be my pathselected property but as i said i dont know how to do it</p>