0
몇 가지 테이블 (MSSQL)을 XML 파일로 변환하려고합니다. 결과는 2.7MB (끝나기 2KB)에서 잘립니다.mssql 쿼리, non xml 데이터 크기 설정
vs express (SQL> 실행 설정> 쿼리 옵션 ...> resutls> 그리드> "비 xml 데이터"및 "xml 데이터")에서 "비 xml 데이터"크기 및 "xml 데이터") 그러면 정확한 결과를 얻을 수 있습니다.
쿼리가 정상적으로 작동합니다.
문제가 발생했습니다. 쿼리 윈도우가 아닌 프로그램 (C#)에서만 필요합니다.
나는 executexmlreader를 사용합니다.
누군가 이상한 점이 있습니다. 무엇이 잘못 될 수 있습니까?
SqlConnection testConnection = new SqlConnection();
testConnection.ConnectionString = @"Data Source=.\SQLEXPRESS;Integrated Security=True;Connect Timeout=30;";
testConnection.Open();
TestCommand = new SqlCommand("exec prAdvListToXML", testConnection);
XmlReader TestXmlReader = TestCommand.ExecuteXmlReader();
XmlWriter TestFileWriter = XmlWriter.Create(@"C:\temp\output.xml");
TestFileWriter.WriteProcessingInstruction("xml", "version='1.0' encoding='UTF-16'");
TestFileWriter.WriteNode(TestXmlReader, true);