.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

invalid character whil running the open xml script

Posted By:      Posted Date: October 27, 2010    Points: 0   Category :Sql Server
hi i am facing problem while running the following sql statement

 SET NOCOUNT ON DECLARE @hDoc INT EXEC sp_xml_preparedocument @hDoc OUTPUT, '<NewDataSet> <Forms Layout=''&lt;StackPanel Background=&quot;#FFFFFFFF&quot; Name=&quot;StackPanelUser&quot; Width=&quot;1001&quot; Height=&quot;600&quot; Margin=&quot;10,5,10,5&quot; HorizontalAlignment=&quot;Center&quot; ClipToBounds=&quot;True&quot; twcdd:RadDragAndDropManager.AllowDrop=&quot;True&quot; xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot; xmlns:iedf=&quot;clr-namespace:Iris.Ews.Designer.Form;assembly=Iris.Ews.Designer.Form&quot; xmlns:twcdd=&quot;clr-namespace:Telerik.Windows.Controls.DragDrop;assembly=Telerik.Windows.Controls&quot;&gt;&#xD;&#xA; &lt;ScrollViewer HorizontalScrollBarVisibility=&quot;Auto&quot; VerticalScrollBarVisibilit

View Complete Post

More Related Resource Links

Client script not running


Dear all,

in my MVC 2 application, and in the shared Master Page I wrote this little script for menu handling :

<script src="../../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
<script type="text/javascript"> $(document).ready(function () {   
     $('#nav li').hover(  
         function () {  
             //show its submenu  
             $('ul', this).slideDown(100);  
        function () {  
           //hide its submenu  
            $('ul', this).slideUp(100);           

The script, that shows menu items when the

Incorrect syntax near 'GO' error while running a sql script ?


I am using Visual Studio 2008

I have one Database A

now i want to create Database B just like Database A

I generated a script of Database A

and created fresh Database B

Now, when i try to run the generated script against Database B, i get this error, why ? how to fix it ?

sql error

For your information:

I have checked in my script it is:


and i have also tried to save the sql script in notepad as: ANSI, UTF-8 and UNICODE

and then i copied from txt file to query but still doesn't work and getting the same error

and these are the option that i selected/used while creating my script:


XML Task error message hexadecimal invalid character

I am developing a SSIS package to add data from an XML file to an existing SQL Server table.  I have completed several similar projects, but on this XML file I am getting the error from the Data Flow tab between the XML Task and Data Flow Task: Error: 0xC002F304 at XML Task, XML Task: An error occurred with the following error message: "'', hexadecimal value 0x15, is an invalid character. Line 28, position 54.". Error: 0xC002928F at XML Task, XML Task: Property "New Source" has no source Xml text; Xml Text is either invalid, null or empty string. Task failed: XML Task Warning: 0x80019002 at zSTU_TS_Element: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (2) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors. SSIS package "zStu_TS_Element.dtsx" finished: Failure. Do you know how I can fix this? This is the line it is referring to: <z:row c0='12' c1='80' c2='2006-04-17' c3='539' c4='1M2083N4N5N6N75800901110 11 '/>

Simplest way to open my script files?

Hi everybody, I usually save my scripts in the default place offered my SSMS (the location of that place is hard to find). However, if I open a script from a disk from different location, now when I need to open my saved scripts it looks in that folder and not in the folder where all my scripts are kept. How can I open the script from the right place if I don't remember where that folder is and I don't want to re-start SSMS? Thanks a lot in advance.  Premature optimization is the root of all evil in programming. (c) by Donald Knuth Naomi Nosonovsky, Sr. Programmer-Analyst My blog

XmlWriter.WriteRaw - hexadecimal value 0x1F, is an invalid character.

Using VS 2008, .Net 3.5, C#. In creating an XML string, I need to embed some non-printing ASCII characters such as 0x1C, 0x1D, 0x1E and 0x1F. However, when writing them using the WriteRaw function, I get the error message "hexadecimal value 0x1F, is an invalid character". In checking XML specifications, all the characters I am using are valid in XML. The xml declaration in the string is "<?xml version="1.0" encoding="utf-16"?>" Thanks in advance for any guidance.  

BIDS wont let me edit script tasks, Package wont open without a "temp" folder in appdata???

I have a very stupid problem, because the way BIDS works is just hilariousy idiotic.    Short Story: 1) When i try to edit script tasks it will complain about "failed to create project at some random path in temp folder" and wont open anything. I cannot edit script tasks anymore. THe project is essentialy dead to me. REboot or restart wont help. I spent five hours on this project and i dont want to do all that work from scratch! 2) I cannot port my solution to antoher computer or place because it links to the files in appdata/local/temp folder of the pc for some reason. If i delete that folder or port the solution, it will complain about some file in temp folder called "3jews....tmp" and will say that solution is unopenable. Need help to resuce my project and be able to continue working on it!   Long Story: When you make a project, BIDS stores its files in a separate folder: a solution file, a project file, a package file etc. You might have thought, you can now carry your solution over by copying this folder. WRONG! The BIDS actually stores files of  the solution in /Users/name/AppData/Local/Temp folder! And It cannot open a solution/package/project without files from that folder, now what kind of idiotism is that?   It all started with BIDS not saving my script task changes, then telling me "cannot create project in folder

stop running this script error in htmleditor

Hello, I am using AjaxToolkit 3.5 for HTMLEditor contorl. In one of the form i have pasted around 50 pages of word document. While i tried to save the input to the database, i get javascript popup error message saying "Stop running the script". Any help would be appreciated.  

Error when running an SQL script to restore a database on SQL Server 2008 R2 Express

Hi, At work, I use SQL Server 2008 Express running on Windows XP Professional Service Pack 3. At home, I also use SQL Server 2008 Express running on Windows XP Professional Service Pack 3. Whenever I do work on the database at work, I usually restore the database at home (or vice versa) I have been using the following SQL scripts to back up the database and to restore the same database (at work or at home). BackupRealEstate.sql USE Master BACKUP DATABASE [RealEstate] TO DISK = N'F:\My Documents\My Database\RealEstate.bak' WITH NOFORMAT, INIT, NAME = N'RealEstate-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10 GO RestoreRealEstate.sql USE Master RESTORE DATABASE [RealEstate] FROM DISK = N'F:\My Documents\My Database\RealEstate.bak' WITH  FILE = 1, NOUNLOAD, REPLACE, STATS = 10 GO Everything worked fine until I replaced my 8yo home computer with a newer and faster one. My new home computer is running Windows 7 Home Premium and I use the latest SQL Server 2008 R2 Express. When I tried to run the above restore SQL script, I got the following error message: Msg 3101, Level 16, State 1, Line 2 Exclusive access could not be obtained because the database is in use. Msg 3013, Level 16, State 1, Line 2 RESTORE DATABASE is terminating abnormally. There was no other application/process using this database. Can someone please help me? Regards,

Problem running jquery script in Content Page

Hi!! I have a master page in asp.net and a content page with some basic asp.net controls like textbox,buttons,treeview....i have a jquery script in the content page and reference set to the jquery file..The script changes the text property of a button on the keydown event set for the textbox...the script works fine if i copy and paste it in a normal page...the script only ran once when i worte it for the first time the next day when i tried to run the script it was not working..i m facing this problem for running the script in content page and i a m not aware of how to write jquery script for the content page.. i m really not finding any solution where i am wrong i have even tried setting the internet explorer security setting to low..plz plz plz plz plz plz help me on Thanks!!

How do I escape invalid xml character 0x02?

In one of my tables an end user managed to insert a character 0x02 into a varchar(255) column. At some point in time, from this table xml documents are generated using the for xml path() syntax. For the record with the 0x02 character in it this now generates an error:

".Net SqlClient Data Provider: Msg 6841, Level 16, State 1, Line 22
FOR XML could not serialize the data for node 'v' because it contains a character (0x0002) which is not allowed in XML. To retrieve this data using FOR XML, convert it to binary, varbinary or image data type and use the BINARY BASE64 directive."

I've now  hit this error on char(2), but the same error occurs for a lot more characters.

The example below illustrates this by inserting 2 records in a table and creating an xml document for both records. The record with id = 1 is no problem, a valid xml is generated; even the '&' in it is properly escaped in the xml and translated back into a '&' when I retrieve the varchar value for the element. The record with id = 2 can however not be generated into an xml document.

I would expect an escape sequence like '&#02;' to be generated for the char(2) character, analogous like the '&' is escaped as '&amp;'.

IIS 5.1 '.', hexadecimal value 0x00, is an invalid character



I have a  web page which calls some XML from a web service.  The code works fine on my production server (IIS 7) but I get the below error on my Development machine Win XP, IIS 5.1

'.', hexadecimal value 0x00, is an invalid character

Any ideas why I am getting this error when on IIS 5.1

Many thanks in advance


Running DB script with App install


I've got a Windows Service app I wrote that requires three new tables and several views and SPs to be created.  I've got a complete script that works and have added a custom action in the form of a VBS file that references the script file. 

My vbs file looks like this

Set WSHShell = CreateObject("Wscript.Shell")
WSHShell.Run ("sqlcmd -S OFFICE8995 -U sa -P mypassword -d DBName -i C:\Program Files\ITService\TestScript.txt")

I can run the TestScript in Query Analyzer and it works but the VBS file is not working.  The database is a MSDE 2000 db and was hoping to use sqlcmd which I do have on this box. But the osq isnt working either.

How can I debug this?  Anything obvious that I'm missing?



Running Client Script to Read TextBox Value from AJAX PopupControl Extender


I used PopupControl Extender to display row details from a gridview, and need to update the two textboxes, but the changed value in the textboxes did not get picked up when click the update button on the popup window, so I need to get client side javascript to read the new changed value from these text boxes. However, I tried a few way, none worked for me, not sure what is wrong.

1. Add a javascript function in the .aspx file and use onclientclick of the linkbutton control to call the function, I got error of "Microsoft JScript runtime error: Object required".


<script language="javascript" type="text/javascript">
     function newTextValue(textbox) 
      var text = document.getElementById("TextBox1").Value;

<asp:TextBox ID="TextBox1" runat="server"  Text='<%# Bind("GalleryTemplateName") %>' Height="20px" Width="230px"
                    style="text-align: left"></asp:Text

Is there any script for Open/Close sql-server 2008 ?


Is there any script (any batch file) for Open/Close sql-server 2008 ?

thank's in advance

When opening the Reports site, I get "A name was started with an invalid character." error


Hello, I am running out of ideas on how to get SSRS to work.  I am trying get this setup with the intention to replace our Crystal Reports server.  Currently I have set up the RS Virtual Directory on a Win XP box.  The ReportServer database sits on another SQL2000 box. 

I can connect to the http://localhost/ReportServer/ on the XP box to display the page the depicts "Microsoft SQL Server Reporting Services Version 9.00.2047.00"  

When I connect to the http://localhost/Reports/, I get this error "A name was started with an invalid character. Error processing resource 'http://leej/Reports/'. Line 1, Position 2"   I checked my IIS Virtual Directory properties for Reports and ASP.NET is set to v2.0.50727.   I also executed "aspnet_regiis.exe -i" in the "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727" directory.  

Any thought on how to fix this?  I hate to let this blocker deters us from deploying SSRS.



Response.Write(string.Format("", url));


Hello all,

Any suggestions are greatly appreciated...

Here is the website situation:

Webpage A: look & feel alignments are in the central of the screen.  It has a submit button.  The last code in the submit command() is this message subject:

Response.Write(string.Format("<script>window.open('{0}', '_blank');</script>", url));

where url = another webpage B.

The outcome is fine.  Webpage B is populated properly.  However, Webpage A postback as aligment to the left, it is no longer the center. 

I could not find a way to debug the issue.

Once again, thanks in advance.

Should Lotus Notes Client be running or Open in background to send emails programatically using .NET



Does Lotus notes client be running or opened in the background to send emails using Lotus Notes with .Net?

    I am working on a task where my app should send emails using Lotus Notes with .NET . I am able to send mails also. But the problem comes when i close my Lotus Notes mail and try to run my application which sends mails. But the mails are not being delivered. Reason, they were being stored in "Outgoing mail". Again when i open my Lotus Notes client by entering my username and password, then the mails that were in "Outgoing mail" were been delivered. Should lotus notes client run on the background for my application to send emails? Is there any way that my application sends emails even if lotus notes is not opened? I'm struck with this issue all day, did lot of research, but i could find anything.

i used this link  as a base ref to send emails using .net http://www.ibm.com/developerworks/lotus/library/domino-msnet/  

Any help regarding this is greatly appreciated.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend