473,499 Members | 1,990 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML: a string literal was expected, but no opening quote character was found

9 New Member
Hi,


I am using technology:ASP with backend: sql server

I'm trying to get the sql query results in XML on my asp page, after a while or so, but i get an alert box saying

XML: a string literal was expected, but no opening quote character was found.

Any help, guidance, suggestion or solution will be greatly appreciated!

Thanks in advance,

Sush
Feb 28 '07 #1
4 1696
vijaydiwakar
579 Contributor
Hi,


I am using technology:ASP with backend: sql server

I'm trying to get the sql query results in XML on my asp page, after a while or so, but i get an alert box saying

XML: a string literal was expected, but no opening quote character was found.

Any help, guidance, suggestion or solution will be greatly appreciated!

Thanks in advance,

Sush
just show me the result fetched by thy sql
Feb 28 '07 #2
sushweta8
9 New Member
just show me the result fetched by thy sql
Hi Diwakar,

The query returns about 1480 rows of 20 columns each, and it takes 51 seconds to give the results, I'm pasting only the first 50 rows here as there is a restriction of max. 10000 characters.

40 AAAN0001L Charles Dawson Graham Beck Authorised 24/08/2005 NULL 1_1/1 1 1 1 1 1 1 1 Authorised on 24/08/2005 1 NULL NULL 1
40 AARE0002L Ruediger Zastrow Werner Zoeller Not yet issued NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL Not yet issued 0 NULL NULL 1
50 AARE0003L Ruediger Zastrow Ruediger Zastrow Not applicable NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL Not applicable 0 NULL NULL 8
80 AARE0004L Ruediger Zastrow Ulfert Gartz Not applicable NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL Not applicable 1 NULL NULL 7
80 AARE0005L Ruediger Zastrow Ulfert Gartz Not applicable NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL Not applicable 1 NULL NULL 7
80 AARE0006L Ruediger Zastrow Ulfert Gartz Not applicable NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL Not applicable 1 NULL NULL 7
80 AARE0007L Ruediger Zastrow Ulfert Gartz Not applicable NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL Not applicable 1 NULL NULL 7
40 AARE0008L Ruediger Zastrow Ulfert Gartz Issued, with Ulfert Gartz for completion 05/07/2005 NULL NULL NULL NULL NULL NULL NULL NULL NULL Issued on 05/07/2005, with Ulfert Gartz for completion 1 NULL NULL 1
80 ABB-0184L Bernie Robertson Bernie Robertson RAF archived / Authorised NULL NULL 1_1/1 1 1 1 1 1 1 NULL RAF archived / Authorised On 23/03/2004 0 NULL NULL 7
50 ABB-0196L Alan Davies David Vasak Not applicable NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL Not applicable 1 NULL NULL 8
40 ABNB0122L Mike Hunter Richard Harrison Not yet issued NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL Not yet issued 1 NULL NULL 1
80 ABNB0126L Mike Hunter Richard Harrison Not applicable NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL Not applicable 1 NULL NULL 7
40 ABNB0130L Mike Hunter Richard Harrison NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1 NULL NULL 1
40 ABNB0132L Mike Hunter Richard Harrison Not yet issued NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL Not yet issued 1 NULL NULL 1
80 ABNB0141L Fons Kuijpers Richard Harrison Not applicable NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL Not applicable 1 NULL NULL 7
40 ABNB0142L Fons Kuijpers Richard Harrison Not yet issued NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL Not yet issued 0 NULL NULL 1
80 ABNB0144L Fons Kuijpers Richard Harrison Not applicable NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL Not applicable 1 NULL NULL 7
40 ABNB0148L Fons Kuijpers Richard Harrison Authorised 27/11/2003 NULL 1_2/1 2 1 1 1 1 1 NULL Authorised on 27/11/2003 0 NULL NULL 1
40 ABNB0149L Fons Kuijpers Richard Harrison Authorised 27/11/2003 NULL 1_1/1 1 1 1 1 1 1 NULL Authorised on 27/11/2003 0 NULL NULL 1
40 ABNB0151L Fons Kuijpers Richard Harrison Authorised 30/09/2003 NULL 1_1/1 1 1 1 1 1 1 NULL Authorised on 30/09/2003 0 NULL NULL 1
40 ABNB0152L Fons Kuijpers Richard Harrison Authorised 30/09/2003 NULL 1_1/1 1 1 1 1 1 1 NULL Authorised on 30/09/2003 1 NULL NULL 1
40 ABNB0157L Fons Kuijpers Richard Harrison Authorised 16/02/2004 NULL 1_1/1 1 1 1 1 1 1 NULL Authorised on 16/02/2004 0 NULL NULL 1
40 ABNB0158L Fons Kuijpers Richard Harrison Authorised 16/02/2004 NULL 1_1/1 1 1 1 1 1 1 NULL Authorised on 16/02/2004 0 NULL NULL 1
40 ABNB0159L Fons Kuijpers Richard Harrison Authorised 16/02/2004 NULL 1_1/1 1 1 1 1 1 1 NULL Authorised on 16/02/2004 0 NULL NULL 1
80 ABNB0161L Fons Kuijpers Richard Harrison RAF archived NULL NULL 1_1/1 1 1 1 1 1 1 NULL RAF archived On 25/05/2004 0 NULL NULL 7
40 ABNB0163L Fons Kuijpers Richard Harrison Authorised 26/03/2004 NULL 1_1/1 1 1 1 1 1 1 NULL Authorised on 26/03/2004 0 NULL NULL 1
40 ABNB0165L Fons Kuijpers Richard Harrison Authorised 26/04/2004 NULL 1_1/1 1 1 1 1 1 1 NULL Authorised on 26/04/2004 0 NULL NULL 1
40 ABNB0166L Fons Kuijpers Richard Harrison Authorised 26/04/2004 NULL 1_1/1 1 1 1 1 1 1 NULL Authorised on 26/04/2004 0 NULL NULL 1
40 ABNB0167L Fons Kuijpers Richard Harrison Authorised 23/04/2004 NULL 1_1/1 1 1 1 1 1 1 NULL Authorised on 23/04/2004 0 NULL NULL 1
40 ABNB0169L Fons Kuijpers Richard Harrison Authorised 02/08/2004 NULL 1_1/1 1 1 1 1 1 1 1 Authorised on 02/08/2004 0 NULL NULL 1
80 ABNB0171L Fons Kuijpers Richard Harrison Not applicable NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL Not applicable 0 NULL NULL 7
40 ABNB0172L Fons Kuijpers Richard Harrison Authorised 26/11/2004 NULL 1_1/1 1 1 1 1 1 1 1 Authorised on 26/11/2004 0 NULL NULL 1
40 ABNB0173L Fons Kuijpers Richard Harrison Authorised 01/11/2004 NULL 1_1/1 1 1 1 1 1 1 1 Authorised on 01/11/2004 0 NULL NULL 1
40 ABNB0175L Fons Kuijpers Richard Harrison Authorised 26/11/2004 NULL 1_1/1 1 1 1 1 1 1 1 Authorised on 26/11/2004 0 NULL NULL 1
40 ABNB0179L Richard Harrison Willem van Asperen Authorised 17/11/2005 NULL 2_1/3 1 3 1 3 1 1 1 Authorised on 17/11/2005 0 NULL NULL 1
80 ABNB0184L Richard Harrison Richard Inman Not applicable NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL Not applicable 0 NULL NULL 7
80 ABSA0005L Scott Hamilton Jim Deal Not applicable NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL Not applicable 0 NULL NULL 7
80 ABYN0026L Paul Dyson Greg Jones Not applicable NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL Not applicable 0 NULL NULL 7
80 ABYN0027L Paul Dyson Greg Jones Not applicable NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL Not applicable 1 NULL NULL 7
80 ABYN0043L Paul Dyson NULL Not applicable NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL Not applicable 0 NULL NULL 7
80 ABYN0046L Paul Dyson Paul Dyson Not applicable NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL Not applicable 0 NULL NULL 7
10 ABYN0052L Scott Hamilton Richard Inman Not yet issued NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL Not yet issued 0 NULL NULL 4
80 ABZ-0001L Fons Kuijpers Michael Stockkamp Not applicable NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL Not applicable 1 NULL NULL 7
40 ACCE0001L Scott Hamilton NULL Authorised 14/10/2005 NULL 1_1/1 1 1 1 1 1 1 1 Authorised on 14/10/2005 0 NULL NULL 1
30 ADGH0002L Claus Nehmzow Bjoern Beermann Authorised 13/02/2007 NULL 1_1/1 1 1 1 1 1 1 1 Authorised on 13/02/2007 1 NULL NULL 2
80 ADGH0003L Claus Nehmzow Bjoern Beermann Not applicable NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL Not applicable 1 NULL NULL 7
80 ADIN0019L Paul Dyson Richard Inman Not applicable NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL Not applicable 1 NULL NULL 7
80 ADPS0001L Claus Nehmzow Michael Stockkamp Not applicable NULL 11/10/2005 2_3/1 3 1 1 1 1 1 1 Not applicable 1 NULL NULL 7
60 ADPS0005L Claus Nehmzow Bjoern Beermann Not applicable NULL 22/12/2005 1_1/1 1 1 1 1 1 1 1 Not applicable 1 NULL NULL 6
40 ADPS0009L Claus Nehmzow Bjoern Beermann Authorised 14/03/2006 NULL 1_1/1 1 1 1 1 1 1 1 Authorised on 14/03/2006 1 NULL NULL 1


Let me know what else I need to mention.....

Thanks,
sush
Feb 28 '07 #3
sushweta8
9 New Member
Also pasting the code sample below

Expand|Select|Wrap|Line Numbers
  1.  
  2. <%
  3. Response.Buffer = true
  4. Response.Expires=-1444
  5. Response.CacheControl = "no-cache"
  6. Server.ScriptTimeout=10000
  7. Response.CharSet="windows-1252"
  8. Response.ContentType="text/xml"
  9.  
  10. Dim oXMLOutput,oElement,oRs,oCn,iCount,sValue, sCols, iArrayCount, bExists, bLogonPracticeExists
  11.  
  12. Set oCn = server.CreateObject("ADODB.Connection")
  13. Set oRs = server.CreateObject("ADODB.Recordset")
  14. set oXMLOutput=server.CreateObject("MSXML2.DOMDocument")
  15.  
  16. 'connect to the database
  17. oCn.Open Application("gsConnection")
  18.  
  19. 'fetch all the records into the recordset
  20. set oRs=oCn.Execute("gs_get_riskoverview_revised '" & sCriteria & "','" & sData & "','" & sNT_ID & "','" & sStage & "','" & dtStart & "','" & dtEnd & "'")
  21.  
  22. 'sPage name is passed from the corresponding pages from where this page is called through XMLHTTP
  23.  
  24. select case sPage
  25.  
  26. case "Overview"
  27.  
  28. sCols="CURRENT_STAGE,SORT_STAGE,SALES_PROSPECT_CODE,PARTNER_NAME,MANAGER_NAME,RAF_STATUS,LATEST_RAF,COMBINED_OVERALL_RISK,RESEND,ACTIONS"
  29.  
  30. sCols=split(sCols,",")
  31.  
  32. end select
  33.  
  34. 'load the dom object
  35. oXMLOutput.loadXML("<ROWS/>")
  36.  
  37. 'used for inserting an attribute which is not present in the database
  38. bExists=0
  39.  
  40. 'used for checking the existence of logon users practice
  41. bLogonPracticeExists=0
  42.  
  43. do while not oRs.EOF
  44.     Set oElement = oXMLOutput.createElement("ROW")
  45.     oXMLOutput.selectSingleNode("//ROWS").appendChild oElement
  46.     for iArrayCount=lbound(sCols) to ubound(sCols)
  47.         for iCount=0 to oRs.Fields.Count-1
  48.             if sCols(iArrayCount)=oRs.Fields(iCount).Name then
  49.                 if oRs.Fields(iCount).Value=NULL or IsNull(oRs.Fields(iCount).Value) then
  50.                     sValue=""
  51.                 else
  52.                     sValue=oRs.Fields(iCount).Value
  53.                 end if
  54.                 oElement.setAttribute oRs.Fields(iCount).Name,sValue
  55.                 bExists=1
  56.                 exit for
  57.             end if
  58.         next
  59.         if bExists=0 then
  60.             oElement.setAttribute sCols(iArrayCount),""
  61.         end if
  62.         'reset
  63.         bExists=0
  64.     next
  65.  
  66.     'check if the logon user practice is present in the recordset
  67.     'if no then add it in the xml string    
  68.     if sPage="PracticeLoc" or sPage="PracticeGlob" then
  69.         if oRs("UNIT_CODE")=sPracticeCode then
  70.             bLogonPracticeExists=1
  71.         end if
  72.     end if
  73.     oRs.MoveNext
  74. loop
  75.  
  76. 'if the flag bLogonPracticeExists=0 then the recordset has not retrieved 
  77. 'the logon users practice hence added it to the xml string
  78. if (sPage="PracticeLoc" or sPage="PracticeGlob") and bLogonPracticeExists=0 then
  79.     Set oElement = oXMLOutput.createElement("ROW")
  80.     oXMLOutput.selectSingleNode("//ROWS").appendChild oElement
  81.     oElement.setAttribute "UNIT_CODE",sPracticeCode
  82.     oElement.setAttribute "UNIT_NAME",sDescription
  83. end if
  84.  
  85. %>
  86. <?xml version="1.0" encoding="windows-1252"?>
  87. <%
  88. Response.Write oXMLOutput.xml
  89.  
  90. set oXMLOutput=Nothing
  91. set oCn=Nothing
  92. set oRs=Nothing
  93. %>
  94.  
  95.  
Mar 5 '07 #4
sushweta8
9 New Member
Please remove this thread
Mar 12 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

16
6288
by: Mike | last post by:
Does anyone know of a minimal/mini/tiny/small xml parser in c? I'm looking for something small that accepts a stream or string, builds a c structure, and then returns an opaque pointer to that...
2
3321
by: Robert M. Gary | last post by:
I'm using JRE 1.5 on Solaris Japanese (Sparc). The JVM claims its default character set is EUC-JP I'm seeing two strange things when using Japanese character sets... 1) If I write a program that...
7
7060
by: herrcho | last post by:
i'm in the course of learning C, and found these two words "string, string literal" confusing me.. I'd like to know the difference between them.. Thank you
4
7455
by: Guadala Harry | last post by:
I need to place the following into a string... How can I properly escape the % " / < and > characters? <table width="100%" border="0" cellspacing="0" cellpadding="4px" class="hfAll"></Table> ...
3
5044
by: Jerome Cohen | last post by:
AI am trying to call a third-party web service. this service expects an XML fragment that contains the request plus other parameter. adding the web reference created the syntax below(reference.vb)....
7
9366
by: Jonny | last post by:
Hi, I am trying to write a C function which will dequote the string in a char * variable, and unescape any escaped quotes, so that, for example: "hello" would become: hello
2
5303
by: RdS | last post by:
Hello, I use sourcesafe and vb 2003 for my dev environment. on the sourcesafe server I also have sql2005 and reporting services installed. The web app references this sql server for db. When...
0
1708
by: sushweta8 | last post by:
Hi, technology:ASP, backend: sql server I'm trying to present the sql query results in XML on my asp page, but i get an alert box saying XML: a string literal was expected, but no opening...
8
27035
by: sushweta8 | last post by:
Hi, I am using technology:ASP with backend: sql server I'm trying to get the sql query results in XML on my asp page, after a while or so, but i get an alert box saying XML: a string...
9
1721
by: somenath | last post by:
Hi All, I was going through one piece of code which is written by an experience programmer and it is working fine. But I think the use of "strstr" is not proper because it may show undefined...
0
7131
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7007
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7174
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7220
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7388
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5470
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4600
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
297
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.