help with string formatting
I am using a small function to return information from an Access
database.
Whether I use xml formatted text or otherwise, the results are
returned to me in a undesired, formatted way. I'm new to C#, so I'm not certain
if I'm missing something or this is just the tough breaks with this
language. What I need is either a proper way of extracting the data
WITHOUT the regular expressions or a work around - some way to
parse the results.
Here's the function that returns the code -- very basic stuff:
public DataSet DataQuery(string dbConnectionString, string
sqlStatement)
{
OleDbConnection conn;
OleDbDataAdapter cmd;
DataSet results = new DataSet();
conn = new OleDbConnection(dbConnectionString);
cmd = new OleDbDataAdapter(sqlStatement, conn);
conn.Open();
cmd.Fill(results);
conn.Close();
}
Here is a sample of the data in the field I am returning, taken
straight from the database:
Here's what it looks like after the results dataset is filled:
\r\n
Even with ordinary text - it adds the unwanted expressions:
Test = "test"
Test = \"test\"
Is this just how c# returns text or am I missing something?
Any help on this issue would be most appreciated!
S.H.