Question : Inserting XML data int an nText field in SQL 2005

I'm having a bit of trouble inserting an XML string into a SQL Databese.  I am using ASP and SQL2005, and I am building the XML string dynamically before attempting to INSERT.  Below is a sample of the statement I am trying to execute.
Code Snippet:
1:
2:
INSERT INTO dnn_KB_XMod_Modules (PortalID,FormID,DateAdded,DateModified,AddUser,UpdateUser,Approved,DisplayDate,ExpiryDate,InstanceData) 
VALUES (0,4,'5/29/2008','5/29/2008',2,2,'true','5/29/2008','12/31/9999 12:00:00 AM','MatthewLinardos[email protected]631-979-2458
31 Winslow Lane
Smithtown11787631-921-9947631-921-06546Adult Small155No_xclick[email protected]SportCamp11USDUShttp://www.smithtownboosterclub.com/ThankYou/tabid/76/Default.aspxhttp://www.smithtownboosterclub.com/
');

Answer : Inserting XML data int an nText field in SQL 2005

>>The XML parse error 0xc00ce505 occurred on line number 1, near the XML text <<
This is due to the fact that the Xml is not a well-formed and is is causing the sp_xml_preparedocument extended stored procedure to fail:
1. 2. should not be there.

This is what your Xml should look like after making those corrections:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:

	Matthew
	Linardos
	[email protected]
	631-979-2458
	
31 Winslow Lane
Smithtown 11787 631-921-9947 631-921-0654 6 Adult Small 155 No _xclick [email protected] SportCamp 1 1 USD US http://www.smithtownboosterclub.com/ThankYou/tabid/76/Default.aspx http://www.smithtownboosterclub.com/
Random Solutions  
 
programming4us programming4us