ADO: ' ' is an unexpected token. The expected token is '"' or '. Line 1, position 15.

  • johnbasedow / 100 / Sun, 05 Apr 2009 11:39:00 GMT / Comments (1)
  • I am getting this error :

    ' ' is an unexpected token. The expected token is '"' or '''. Line 1, position 15.

    on line Big SmilesOrders.ReadXml(path);

    the value of path is:"C:\\orders\\Orders.xml"

    any help pls

    private void fswOrders_Created(object sender, FileSystemEventArgs e)

    {

    string path = e.FullPath;

    DataSet dsOrders = new DataSet();

    dsOrders.ReadXml(path); // ERROR HERE

    string strCn = ..."Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Nwind.mdb";

    string strOrderQuery = "SELECT * FROM Orders";

    OleDbDataAdapter da = new OleDbDataAdapter(strOrderQuery, strCn);

  • Keywords:

    unexpected, token, expected, token, quot, line, position, 15, ado

  • http://dotnet.itags.org/dotnet-ado/103070/«« Last Thread - Next Thread »»
    1. That line is telling you there is something wrong with your XML file. Likely an invalid character for XML somewhere (like a < where it shouldn't be or something)

      looks like your planning to fill the dataset from a database anyway, so is there a reason you're filling (or trying to fill) it with an XML document?

      -mwalts

      mwalts | Fri, 28 Sep 2007 13:34:00 GMT |