Hello, thank you for reading. I'm brand new to C# and C # Corner.
I'm working on submitting an invoice via XML, however I keep getting an error on the XmlReader line (line 13). I know the Sql connection and properties are correct becuase I copied them over from another connection in my solution that I know works.
Not sure what I'm missing, anyhelp would be greatly appreaciated!
- public void SubmitInvoice()
- {
- SqlConnection myConnection = null;
- try
- {
-
- myConnection = new SqlConnection(Settings.connectString);
- SqlCommand myCommand = new SqlCommand("usp_Get_Invoice", myConnection);
- myCommand.CommandType = CommandType.StoredProcedure;
- myCommand.CommandTimeout = 300;
- myConnection.Open();
-
- XmlReader results = myCommand.ExecuteXmlReader();
- if (results.Read())