473,699 Members | 2,711 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unwanted Escape Codes In String...

Hello,

I have built an XMLDocument object instance and I get the following string
when I examine the InnerXml property:

<?xml version=\"1.0\" ?><ROOT><UserDa ta UserID=\"2282\" ><Tag1
QID=\"55111\">< Tag2 AID=\"5511101\" ></Tag2></Tag1><Tag1 QID=\"55112\">< Tag2
AID=\"5511217\" ></Tag2></Tag1><Tag1 QID=\"5512282\" ><Tag2
AID=\"551228206 \"></Tag2></Tag1><Tag1 QID=\"55114\">< Tag2
AID=\"5511406\" ></Tag2></Tag1><Tag1 QID=\"55115\">< Tag2
AID=\"5511505\" ></Tag2></Tag1></UserData></ROOT>

Notice that the double quotes are all escaped--that is they appear as

\"

versus

"

I would like to "transform" or "convert" this string into a string in which
the escape characters are "converted" . This would generate a string that
would appear like this:

<?xml version="1.0"?> <ROOT><UserDa ta UserID="2282">< Tag1 QID="55111"><Ta g2
AID="5511101"></Tag2></Tag1><Tag1 QID="55112"><Ta g2
AID="5511217"></Tag2></Tag1><Tag1 QID="5512282">< Tag2
AID="551228206" ></Tag2></Tag1><Tag1 QID="55114"><Ta g2
AID="5511406"></Tag2></Tag1><Tag1 QID="55115"><Ta g2
AID="5511505"></Tag2></Tag1></UserData></ROOT>

I do not want to use a search/replace algorithm because I cannot be entirely
sure that there will not be escape sequences other than \" in the string. I
am actually seeking a solution that would "transform" the \" to " (as I
require) but also one that would convert \n to ASCII 10 and \r to ASCII 13.
In other words, I would like to convert the escape-encoded string to a
standard ASCII string.

Moreover, why does the XMLDocument's InnerXml return an escape-encoded
string instead of a "straight" (unencoded) string? Is there a way to get the
InnerXml to return the "straight" string? I plan to pass the XML string as
an argument to a Sql stored procedure; therefore, the encoded string does
not work--I must use the unencoded version. Certainly others have
encountered this problem--I just could not find a single solution and I
spend hours searching MSDN and Google! For example, I read some other
threads that suggest using ActiveXMessageF ormatter, but not one of them
actually explained how to do it--and pseudocode can only be so useful...

Thank you in advance for any assistance. I will confirm whether any
suggestions work.

Regards,
Steve


Nov 15 '05 #1
18 7185
dd
It is the C# escape character, i.e. "\", as well as C and C++.
You do not have to replace it with anythng. Just leave it.
Just pass it to your stored procedure as is, it will work OK.

"Steve Litvack" <us************ @yahoo.com> wrote in message
news:RD******** ************@tw ister.austin.rr .com...
Hello,

I have built an XMLDocument object instance and I get the following string
when I examine the InnerXml property:

<?xml version=\"1.0\" ?><ROOT><UserDa ta UserID=\"2282\" ><Tag1
QID=\"55111\">< Tag2 AID=\"5511101\" ></Tag2></Tag1><Tag1 QID=\"55112\">< Tag2 AID=\"5511217\" ></Tag2></Tag1><Tag1 QID=\"5512282\" ><Tag2
AID=\"551228206 \"></Tag2></Tag1><Tag1 QID=\"55114\">< Tag2
AID=\"5511406\" ></Tag2></Tag1><Tag1 QID=\"55115\">< Tag2
AID=\"5511505\" ></Tag2></Tag1></UserData></ROOT>

Notice that the double quotes are all escaped--that is they appear as

\"

versus

"

I would like to "transform" or "convert" this string into a string in which the escape characters are "converted" . This would generate a string that
would appear like this:

<?xml version="1.0"?> <ROOT><UserDa ta UserID="2282">< Tag1 QID="55111"><Ta g2
AID="5511101"></Tag2></Tag1><Tag1 QID="55112"><Ta g2
AID="5511217"></Tag2></Tag1><Tag1 QID="5512282">< Tag2
AID="551228206" ></Tag2></Tag1><Tag1 QID="55114"><Ta g2
AID="5511406"></Tag2></Tag1><Tag1 QID="55115"><Ta g2
AID="5511505"></Tag2></Tag1></UserData></ROOT>

I do not want to use a search/replace algorithm because I cannot be entirely sure that there will not be escape sequences other than \" in the string. I am actually seeking a solution that would "transform" the \" to " (as I
require) but also one that would convert \n to ASCII 10 and \r to ASCII 13. In other words, I would like to convert the escape-encoded string to a
standard ASCII string.

Moreover, why does the XMLDocument's InnerXml return an escape-encoded
string instead of a "straight" (unencoded) string? Is there a way to get the InnerXml to return the "straight" string? I plan to pass the XML string as
an argument to a Sql stored procedure; therefore, the encoded string does
not work--I must use the unencoded version. Certainly others have
encountered this problem--I just could not find a single solution and I
spend hours searching MSDN and Google! For example, I read some other
threads that suggest using ActiveXMessageF ormatter, but not one of them
actually explained how to do it--and pseudocode can only be so useful...

Thank you in advance for any assistance. I will confirm whether any
suggestions work.

Regards,
Steve


Nov 15 '05 #2
dd
It is the C# escape character, i.e. "\", as well as C and C++.
You do not have to replace it with anythng. Just leave it.
Just pass it to your stored procedure as is, it will work OK.

"Steve Litvack" <us************ @yahoo.com> wrote in message
news:RD******** ************@tw ister.austin.rr .com...
Hello,

I have built an XMLDocument object instance and I get the following string
when I examine the InnerXml property:

<?xml version=\"1.0\" ?><ROOT><UserDa ta UserID=\"2282\" ><Tag1
QID=\"55111\">< Tag2 AID=\"5511101\" ></Tag2></Tag1><Tag1 QID=\"55112\">< Tag2 AID=\"5511217\" ></Tag2></Tag1><Tag1 QID=\"5512282\" ><Tag2
AID=\"551228206 \"></Tag2></Tag1><Tag1 QID=\"55114\">< Tag2
AID=\"5511406\" ></Tag2></Tag1><Tag1 QID=\"55115\">< Tag2
AID=\"5511505\" ></Tag2></Tag1></UserData></ROOT>

Notice that the double quotes are all escaped--that is they appear as

\"

versus

"

I would like to "transform" or "convert" this string into a string in which the escape characters are "converted" . This would generate a string that
would appear like this:

<?xml version="1.0"?> <ROOT><UserDa ta UserID="2282">< Tag1 QID="55111"><Ta g2
AID="5511101"></Tag2></Tag1><Tag1 QID="55112"><Ta g2
AID="5511217"></Tag2></Tag1><Tag1 QID="5512282">< Tag2
AID="551228206" ></Tag2></Tag1><Tag1 QID="55114"><Ta g2
AID="5511406"></Tag2></Tag1><Tag1 QID="55115"><Ta g2
AID="5511505"></Tag2></Tag1></UserData></ROOT>

I do not want to use a search/replace algorithm because I cannot be entirely sure that there will not be escape sequences other than \" in the string. I am actually seeking a solution that would "transform" the \" to " (as I
require) but also one that would convert \n to ASCII 10 and \r to ASCII 13. In other words, I would like to convert the escape-encoded string to a
standard ASCII string.

Moreover, why does the XMLDocument's InnerXml return an escape-encoded
string instead of a "straight" (unencoded) string? Is there a way to get the InnerXml to return the "straight" string? I plan to pass the XML string as
an argument to a Sql stored procedure; therefore, the encoded string does
not work--I must use the unencoded version. Certainly others have
encountered this problem--I just could not find a single solution and I
spend hours searching MSDN and Google! For example, I read some other
threads that suggest using ActiveXMessageF ormatter, but not one of them
actually explained how to do it--and pseudocode can only be so useful...

Thank you in advance for any assistance. I will confirm whether any
suggestions work.

Regards,
Steve


Nov 15 '05 #3
dd
Can you post your SP code as well as the code that creates SP paramaters?

"Steve Litvack" <us************ @yahoo.com> wrote in message
news:Ps******** ************@tw ister.austin.rr .com...
No--it does not work. That is why I posted the message.

SQL Server reports:

Server: Msg 6603, Level 16, State 1, Procedure sp_xml_prepared ocument, Line 27

XML parsing error: A string literal was expected, but no opening quote
character was found.
If anyone has any ideas on how to generate the "pure" ASCII XML text I
requested, please let me know.

Thanks,
-- Steve

"dd" <so*****@somewh ere.com> wrote in message
news:uS******** ************@ne ws20.bellglobal .com...
It is the C# escape character, i.e. "\", as well as C and C++.
You do not have to replace it with anythng. Just leave it.
Just pass it to your stored procedure as is, it will work OK.

"Steve Litvack" <us************ @yahoo.com> wrote in message
news:RD******** ************@tw ister.austin.rr .com...
Hello,

I have built an XMLDocument object instance and I get the following string when I examine the InnerXml property:

<?xml version=\"1.0\" ?><ROOT><UserDa ta UserID=\"2282\" ><Tag1
QID=\"55111\">< Tag2 AID=\"5511101\" ></Tag2></Tag1><Tag1 QID=\"55112\">< Tag2
AID=\"5511217\" ></Tag2></Tag1><Tag1 QID=\"5512282\" ><Tag2
AID=\"551228206 \"></Tag2></Tag1><Tag1 QID=\"55114\">< Tag2
AID=\"5511406\" ></Tag2></Tag1><Tag1 QID=\"55115\">< Tag2
AID=\"5511505\" ></Tag2></Tag1></UserData></ROOT>

Notice that the double quotes are all escaped--that is they appear as

\"

versus

"

I would like to "transform" or "convert" this string into a string in

which
the escape characters are "converted" . This would generate a string that would appear like this:

<?xml version="1.0"?> <ROOT><UserDa ta UserID="2282">< Tag1 QID="55111"><Ta g2 AID="5511101"></Tag2></Tag1><Tag1 QID="55112"><Ta g2
AID="5511217"></Tag2></Tag1><Tag1 QID="5512282">< Tag2
AID="551228206" ></Tag2></Tag1><Tag1 QID="55114"><Ta g2
AID="5511406"></Tag2></Tag1><Tag1 QID="55115"><Ta g2
AID="5511505"></Tag2></Tag1></UserData></ROOT>

I do not want to use a search/replace algorithm because I cannot be

entirely
sure that there will not be escape sequences other than \" in the string.
I
am actually seeking a solution that would "transform" the \" to " (as I require) but also one that would convert \n to ASCII 10 and \r to ASCII
13.
In other words, I would like to convert the escape-encoded string to a
standard ASCII string.

Moreover, why does the XMLDocument's InnerXml return an escape-encoded
string instead of a "straight" (unencoded) string? Is there a way to
get the
InnerXml to return the "straight" string? I plan to pass the XML

string as an argument to a Sql stored procedure; therefore, the encoded string does not work--I must use the unencoded version. Certainly others have
encountered this problem--I just could not find a single solution and

I spend hours searching MSDN and Google! For example, I read some other
threads that suggest using ActiveXMessageF ormatter, but not one of them actually explained how to do it--and pseudocode can only be so useful...
Thank you in advance for any assistance. I will confirm whether any
suggestions work.

Regards,
Steve




Nov 15 '05 #4
dd
Can you post your SP code as well as the code that creates SP paramaters?

"Steve Litvack" <us************ @yahoo.com> wrote in message
news:Ps******** ************@tw ister.austin.rr .com...
No--it does not work. That is why I posted the message.

SQL Server reports:

Server: Msg 6603, Level 16, State 1, Procedure sp_xml_prepared ocument, Line 27

XML parsing error: A string literal was expected, but no opening quote
character was found.
If anyone has any ideas on how to generate the "pure" ASCII XML text I
requested, please let me know.

Thanks,
-- Steve

"dd" <so*****@somewh ere.com> wrote in message
news:uS******** ************@ne ws20.bellglobal .com...
It is the C# escape character, i.e. "\", as well as C and C++.
You do not have to replace it with anythng. Just leave it.
Just pass it to your stored procedure as is, it will work OK.

"Steve Litvack" <us************ @yahoo.com> wrote in message
news:RD******** ************@tw ister.austin.rr .com...
Hello,

I have built an XMLDocument object instance and I get the following string when I examine the InnerXml property:

<?xml version=\"1.0\" ?><ROOT><UserDa ta UserID=\"2282\" ><Tag1
QID=\"55111\">< Tag2 AID=\"5511101\" ></Tag2></Tag1><Tag1 QID=\"55112\">< Tag2
AID=\"5511217\" ></Tag2></Tag1><Tag1 QID=\"5512282\" ><Tag2
AID=\"551228206 \"></Tag2></Tag1><Tag1 QID=\"55114\">< Tag2
AID=\"5511406\" ></Tag2></Tag1><Tag1 QID=\"55115\">< Tag2
AID=\"5511505\" ></Tag2></Tag1></UserData></ROOT>

Notice that the double quotes are all escaped--that is they appear as

\"

versus

"

I would like to "transform" or "convert" this string into a string in

which
the escape characters are "converted" . This would generate a string that would appear like this:

<?xml version="1.0"?> <ROOT><UserDa ta UserID="2282">< Tag1 QID="55111"><Ta g2 AID="5511101"></Tag2></Tag1><Tag1 QID="55112"><Ta g2
AID="5511217"></Tag2></Tag1><Tag1 QID="5512282">< Tag2
AID="551228206" ></Tag2></Tag1><Tag1 QID="55114"><Ta g2
AID="5511406"></Tag2></Tag1><Tag1 QID="55115"><Ta g2
AID="5511505"></Tag2></Tag1></UserData></ROOT>

I do not want to use a search/replace algorithm because I cannot be

entirely
sure that there will not be escape sequences other than \" in the string.
I
am actually seeking a solution that would "transform" the \" to " (as I require) but also one that would convert \n to ASCII 10 and \r to ASCII
13.
In other words, I would like to convert the escape-encoded string to a
standard ASCII string.

Moreover, why does the XMLDocument's InnerXml return an escape-encoded
string instead of a "straight" (unencoded) string? Is there a way to
get the
InnerXml to return the "straight" string? I plan to pass the XML

string as an argument to a Sql stored procedure; therefore, the encoded string does not work--I must use the unencoded version. Certainly others have
encountered this problem--I just could not find a single solution and

I spend hours searching MSDN and Google! For example, I read some other
threads that suggest using ActiveXMessageF ormatter, but not one of them actually explained how to do it--and pseudocode can only be so useful...
Thank you in advance for any assistance. I will confirm whether any
suggestions work.

Regards,
Steve




Nov 15 '05 #5
dd
Your problem is not the escape character, and it has nothing to do with
"pure" ASCII XML text. If your stored procedure has no errors and you are
passing your parameter properly, it should work without any problems. Here
is the code that I tried and it worked.

private SqlParameter CreateParameter (string sName, SqlDbType lType, int
iSize, ParameterDirect ion lDir,

bool bNullable, string sValue)

{

SqlParameter oParameter = new SqlParameter(sN ame, lType);

oParameter.Size = iSize;

oParameter.Dire ction = lDir;

oParameter.IsNu llable = bNullable;

oParameter.Valu e = sValue;

return oParameter;

}

private void button1_Click(o bject sender, System.EventArg s e)

{

string sString = "<?xml version=\"1.0\" ?><ROOT><UserDa ta
UserID=\"2282\" ><Tag1 QID=\"55111\">< Tag2
AID=\"5511101\" ></Tag2></Tag1><Tag1 QID=\"55112\">< Tag2
AID=\"5511217\" ></Tag2></Tag1><Tag1 QID=\"5512282\" ><Tag2
AID=\"551228206 \"></Tag2></Tag1><Tag1 QID=\"55114\">< Tag2
AID=\"5511406\" ></Tag2></Tag1><Tag1 QID=\"55115\">< Tag2
AID=\"5511505\" ></Tag2></Tag1></UserData></ROOT>";

SqlConnection oConn = new SqlConnection() ;

SqlCommand oCmd = new SqlCommand();

oConn.Connectio nString = "your connection string";

try{oConn.Open( );}

catch(Exception ex){string sException = ex.Message;};

oCmd.Connection = oConn;

oCmd.CommandTyp e = CommandType.Sto redProcedure;

oCmd.CommandTex t = "sp_Test";

oCmd.Parameters .Add(CreatePara meter("@StringI n", SqlDbType.VarCh ar, 900 ,
ParameterDirect ion.Input,

false, sString));

try

{

oCmd.ExecuteNon Query();

}

catch(System.Ex ception ex){string sException = ex.Message;}

oConn.Close();

oCmd.Dispose(); oConn.Dispose() ;

}

Here is the stored provedure:

CREATE PROCEDURE sp_Test

@StringIn varchar(900)
AS
DECLARE @hdoc int
--Create an internal representation of the XML document.
EXEC sp_xml_prepared ocument @hdoc OUTPUT, @StringIn
EXEC sp_xml_removedo cument @hDoc

GO

"Steve Litvack" <us************ @yahoo.com> wrote in message
news:Ps******** ************@tw ister.austin.rr .com...
No--it does not work. That is why I posted the message.

SQL Server reports:

Server: Msg 6603, Level 16, State 1, Procedure sp_xml_prepared ocument, Line 27

XML parsing error: A string literal was expected, but no opening quote
character was found.
If anyone has any ideas on how to generate the "pure" ASCII XML text I
requested, please let me know.

Thanks,
-- Steve

"dd" <so*****@somewh ere.com> wrote in message
news:uS******** ************@ne ws20.bellglobal .com...
It is the C# escape character, i.e. "\", as well as C and C++.
You do not have to replace it with anythng. Just leave it.
Just pass it to your stored procedure as is, it will work OK.

"Steve Litvack" <us************ @yahoo.com> wrote in message
news:RD******** ************@tw ister.austin.rr .com...
Hello,

I have built an XMLDocument object instance and I get the following string when I examine the InnerXml property:

<?xml version=\"1.0\" ?><ROOT><UserDa ta UserID=\"2282\" ><Tag1
QID=\"55111\">< Tag2 AID=\"5511101\" ></Tag2></Tag1><Tag1 QID=\"55112\">< Tag2
AID=\"5511217\" ></Tag2></Tag1><Tag1 QID=\"5512282\" ><Tag2
AID=\"551228206 \"></Tag2></Tag1><Tag1 QID=\"55114\">< Tag2
AID=\"5511406\" ></Tag2></Tag1><Tag1 QID=\"55115\">< Tag2
AID=\"5511505\" ></Tag2></Tag1></UserData></ROOT>

Notice that the double quotes are all escaped--that is they appear as

\"

versus

"

I would like to "transform" or "convert" this string into a string in

which
the escape characters are "converted" . This would generate a string that would appear like this:

<?xml version="1.0"?> <ROOT><UserDa ta UserID="2282">< Tag1 QID="55111"><Ta g2 AID="5511101"></Tag2></Tag1><Tag1 QID="55112"><Ta g2
AID="5511217"></Tag2></Tag1><Tag1 QID="5512282">< Tag2
AID="551228206" ></Tag2></Tag1><Tag1 QID="55114"><Ta g2
AID="5511406"></Tag2></Tag1><Tag1 QID="55115"><Ta g2
AID="5511505"></Tag2></Tag1></UserData></ROOT>

I do not want to use a search/replace algorithm because I cannot be

entirely
sure that there will not be escape sequences other than \" in the string.
I
am actually seeking a solution that would "transform" the \" to " (as I require) but also one that would convert \n to ASCII 10 and \r to ASCII
13.
In other words, I would like to convert the escape-encoded string to a
standard ASCII string.

Moreover, why does the XMLDocument's InnerXml return an escape-encoded
string instead of a "straight" (unencoded) string? Is there a way to
get the
InnerXml to return the "straight" string? I plan to pass the XML

string as an argument to a Sql stored procedure; therefore, the encoded string does not work--I must use the unencoded version. Certainly others have
encountered this problem--I just could not find a single solution and

I spend hours searching MSDN and Google! For example, I read some other
threads that suggest using ActiveXMessageF ormatter, but not one of them actually explained how to do it--and pseudocode can only be so useful...
Thank you in advance for any assistance. I will confirm whether any
suggestions work.

Regards,
Steve




Nov 15 '05 #6
dd
Your problem is not the escape character, and it has nothing to do with
"pure" ASCII XML text. If your stored procedure has no errors and you are
passing your parameter properly, it should work without any problems. Here
is the code that I tried and it worked.

private SqlParameter CreateParameter (string sName, SqlDbType lType, int
iSize, ParameterDirect ion lDir,

bool bNullable, string sValue)

{

SqlParameter oParameter = new SqlParameter(sN ame, lType);

oParameter.Size = iSize;

oParameter.Dire ction = lDir;

oParameter.IsNu llable = bNullable;

oParameter.Valu e = sValue;

return oParameter;

}

private void button1_Click(o bject sender, System.EventArg s e)

{

string sString = "<?xml version=\"1.0\" ?><ROOT><UserDa ta
UserID=\"2282\" ><Tag1 QID=\"55111\">< Tag2
AID=\"5511101\" ></Tag2></Tag1><Tag1 QID=\"55112\">< Tag2
AID=\"5511217\" ></Tag2></Tag1><Tag1 QID=\"5512282\" ><Tag2
AID=\"551228206 \"></Tag2></Tag1><Tag1 QID=\"55114\">< Tag2
AID=\"5511406\" ></Tag2></Tag1><Tag1 QID=\"55115\">< Tag2
AID=\"5511505\" ></Tag2></Tag1></UserData></ROOT>";

SqlConnection oConn = new SqlConnection() ;

SqlCommand oCmd = new SqlCommand();

oConn.Connectio nString = "your connection string";

try{oConn.Open( );}

catch(Exception ex){string sException = ex.Message;};

oCmd.Connection = oConn;

oCmd.CommandTyp e = CommandType.Sto redProcedure;

oCmd.CommandTex t = "sp_Test";

oCmd.Parameters .Add(CreatePara meter("@StringI n", SqlDbType.VarCh ar, 900 ,
ParameterDirect ion.Input,

false, sString));

try

{

oCmd.ExecuteNon Query();

}

catch(System.Ex ception ex){string sException = ex.Message;}

oConn.Close();

oCmd.Dispose(); oConn.Dispose() ;

}

Here is the stored provedure:

CREATE PROCEDURE sp_Test

@StringIn varchar(900)
AS
DECLARE @hdoc int
--Create an internal representation of the XML document.
EXEC sp_xml_prepared ocument @hdoc OUTPUT, @StringIn
EXEC sp_xml_removedo cument @hDoc

GO

"Steve Litvack" <us************ @yahoo.com> wrote in message
news:Ps******** ************@tw ister.austin.rr .com...
No--it does not work. That is why I posted the message.

SQL Server reports:

Server: Msg 6603, Level 16, State 1, Procedure sp_xml_prepared ocument, Line 27

XML parsing error: A string literal was expected, but no opening quote
character was found.
If anyone has any ideas on how to generate the "pure" ASCII XML text I
requested, please let me know.

Thanks,
-- Steve

"dd" <so*****@somewh ere.com> wrote in message
news:uS******** ************@ne ws20.bellglobal .com...
It is the C# escape character, i.e. "\", as well as C and C++.
You do not have to replace it with anythng. Just leave it.
Just pass it to your stored procedure as is, it will work OK.

"Steve Litvack" <us************ @yahoo.com> wrote in message
news:RD******** ************@tw ister.austin.rr .com...
Hello,

I have built an XMLDocument object instance and I get the following string when I examine the InnerXml property:

<?xml version=\"1.0\" ?><ROOT><UserDa ta UserID=\"2282\" ><Tag1
QID=\"55111\">< Tag2 AID=\"5511101\" ></Tag2></Tag1><Tag1 QID=\"55112\">< Tag2
AID=\"5511217\" ></Tag2></Tag1><Tag1 QID=\"5512282\" ><Tag2
AID=\"551228206 \"></Tag2></Tag1><Tag1 QID=\"55114\">< Tag2
AID=\"5511406\" ></Tag2></Tag1><Tag1 QID=\"55115\">< Tag2
AID=\"5511505\" ></Tag2></Tag1></UserData></ROOT>

Notice that the double quotes are all escaped--that is they appear as

\"

versus

"

I would like to "transform" or "convert" this string into a string in

which
the escape characters are "converted" . This would generate a string that would appear like this:

<?xml version="1.0"?> <ROOT><UserDa ta UserID="2282">< Tag1 QID="55111"><Ta g2 AID="5511101"></Tag2></Tag1><Tag1 QID="55112"><Ta g2
AID="5511217"></Tag2></Tag1><Tag1 QID="5512282">< Tag2
AID="551228206" ></Tag2></Tag1><Tag1 QID="55114"><Ta g2
AID="5511406"></Tag2></Tag1><Tag1 QID="55115"><Ta g2
AID="5511505"></Tag2></Tag1></UserData></ROOT>

I do not want to use a search/replace algorithm because I cannot be

entirely
sure that there will not be escape sequences other than \" in the string.
I
am actually seeking a solution that would "transform" the \" to " (as I require) but also one that would convert \n to ASCII 10 and \r to ASCII
13.
In other words, I would like to convert the escape-encoded string to a
standard ASCII string.

Moreover, why does the XMLDocument's InnerXml return an escape-encoded
string instead of a "straight" (unencoded) string? Is there a way to
get the
InnerXml to return the "straight" string? I plan to pass the XML

string as an argument to a Sql stored procedure; therefore, the encoded string does not work--I must use the unencoded version. Certainly others have
encountered this problem--I just could not find a single solution and

I spend hours searching MSDN and Google! For example, I read some other
threads that suggest using ActiveXMessageF ormatter, but not one of them actually explained how to do it--and pseudocode can only be so useful...
Thank you in advance for any assistance. I will confirm whether any
suggestions work.

Regards,
Steve




Nov 15 '05 #7
OK... This obviously is one of those problems where the stored proc works
with "well-formed" (what I call "pure") XML yet does not work with XML
containing escape sequences. This made it appear to be a problem with the
XML I'm using. However, thanks to your efforts you have convinced me that
the problem can also be fixed by reviewing the stored proc and leaving my
XML as-is. Thus, this problem seems to have two solutions: change the XML or
change the sproc.

I will do a little more research on this issue, study what you have kindly
written (and thank you for taking the time you clearly took), and I will
reply with either more information or with the solution(s) I have found.

Regards,
-- Steve

"dd" <so*****@somewh ere.com> wrote in message
news:Nu******** ************@ne ws20.bellglobal .com...
Your problem is not the escape character, and it has nothing to do with
"pure" ASCII XML text. If your stored procedure has no errors and you are
passing your parameter properly, it should work without any problems. Here
is the code that I tried and it worked.

private SqlParameter CreateParameter (string sName, SqlDbType lType, int
iSize, ParameterDirect ion lDir,

bool bNullable, string sValue)

{

SqlParameter oParameter = new SqlParameter(sN ame, lType);

oParameter.Size = iSize;

oParameter.Dire ction = lDir;

oParameter.IsNu llable = bNullable;

oParameter.Valu e = sValue;

return oParameter;

}

private void button1_Click(o bject sender, System.EventArg s e)

{

string sString = "<?xml version=\"1.0\" ?><ROOT><UserDa ta
UserID=\"2282\" ><Tag1 QID=\"55111\">< Tag2
AID=\"5511101\" ></Tag2></Tag1><Tag1 QID=\"55112\">< Tag2
AID=\"5511217\" ></Tag2></Tag1><Tag1 QID=\"5512282\" ><Tag2
AID=\"551228206 \"></Tag2></Tag1><Tag1 QID=\"55114\">< Tag2
AID=\"5511406\" ></Tag2></Tag1><Tag1 QID=\"55115\">< Tag2
AID=\"5511505\" ></Tag2></Tag1></UserData></ROOT>";

SqlConnection oConn = new SqlConnection() ;

SqlCommand oCmd = new SqlCommand();

oConn.Connectio nString = "your connection string";

try{oConn.Open( );}

catch(Exception ex){string sException = ex.Message;};

oCmd.Connection = oConn;

oCmd.CommandTyp e = CommandType.Sto redProcedure;

oCmd.CommandTex t = "sp_Test";

oCmd.Parameters .Add(CreatePara meter("@StringI n", SqlDbType.VarCh ar, 900 ,
ParameterDirect ion.Input,

false, sString));

try

{

oCmd.ExecuteNon Query();

}

catch(System.Ex ception ex){string sException = ex.Message;}

oConn.Close();

oCmd.Dispose(); oConn.Dispose() ;

}

Here is the stored provedure:

CREATE PROCEDURE sp_Test

@StringIn varchar(900)
AS
DECLARE @hdoc int
--Create an internal representation of the XML document.
EXEC sp_xml_prepared ocument @hdoc OUTPUT, @StringIn
EXEC sp_xml_removedo cument @hDoc

GO

"Steve Litvack" <us************ @yahoo.com> wrote in message
news:Ps******** ************@tw ister.austin.rr .com...
No--it does not work. That is why I posted the message.

SQL Server reports:

Server: Msg 6603, Level 16, State 1, Procedure sp_xml_prepared ocument, Line
27

XML parsing error: A string literal was expected, but no opening quote
character was found.
If anyone has any ideas on how to generate the "pure" ASCII XML text I
requested, please let me know.

Thanks,
-- Steve

"dd" <so*****@somewh ere.com> wrote in message
news:uS******** ************@ne ws20.bellglobal .com...
It is the C# escape character, i.e. "\", as well as C and C++.
You do not have to replace it with anythng. Just leave it.
Just pass it to your stored procedure as is, it will work OK.

"Steve Litvack" <us************ @yahoo.com> wrote in message
news:RD******** ************@tw ister.austin.rr .com...
> Hello,
>
> I have built an XMLDocument object instance and I get the following

string
> when I examine the InnerXml property:
>
> <?xml version=\"1.0\" ?><ROOT><UserDa ta UserID=\"2282\" ><Tag1
> QID=\"55111\">< Tag2 AID=\"5511101\" ></Tag2></Tag1><Tag1
QID=\"55112\">< Tag2
> AID=\"5511217\" ></Tag2></Tag1><Tag1 QID=\"5512282\" ><Tag2
> AID=\"551228206 \"></Tag2></Tag1><Tag1 QID=\"55114\">< Tag2
> AID=\"5511406\" ></Tag2></Tag1><Tag1 QID=\"55115\">< Tag2
> AID=\"5511505\" ></Tag2></Tag1></UserData></ROOT>
>
> Notice that the double quotes are all escaped--that is they appear as >
> \"
>
> versus
>
> "
>
> I would like to "transform" or "convert" this string into a string in which
> the escape characters are "converted" . This would generate a string that > would appear like this:
>
> <?xml version="1.0"?> <ROOT><UserDa ta UserID="2282">< Tag1

QID="55111"><Ta g2
> AID="5511101"></Tag2></Tag1><Tag1 QID="55112"><Ta g2
> AID="5511217"></Tag2></Tag1><Tag1 QID="5512282">< Tag2
> AID="551228206" ></Tag2></Tag1><Tag1 QID="55114"><Ta g2
> AID="5511406"></Tag2></Tag1><Tag1 QID="55115"><Ta g2
> AID="5511505"></Tag2></Tag1></UserData></ROOT>
>
> I do not want to use a search/replace algorithm because I cannot be
entirely
> sure that there will not be escape sequences other than \" in the

string.
I
> am actually seeking a solution that would "transform" the \" to " (as I
> require) but also one that would convert \n to ASCII 10 and \r to ASCII 13.
> In other words, I would like to convert the escape-encoded string to
a > standard ASCII string.
>
> Moreover, why does the XMLDocument's InnerXml return an escape-encoded > string instead of a "straight" (unencoded) string? Is there a way to
get the
> InnerXml to return the "straight" string? I plan to pass the XML string
as
> an argument to a Sql stored procedure; therefore, the encoded string

does
> not work--I must use the unencoded version. Certainly others have
> encountered this problem--I just could not find a single solution and I > spend hours searching MSDN and Google! For example, I read some
other > threads that suggest using ActiveXMessageF ormatter, but not one of

them > actually explained how to do it--and pseudocode can only be so useful... >
> Thank you in advance for any assistance. I will confirm whether any
> suggestions work.
>
> Regards,
> Steve
>
>
>
>
>
>



Nov 15 '05 #8
OK... This obviously is one of those problems where the stored proc works
with "well-formed" (what I call "pure") XML yet does not work with XML
containing escape sequences. This made it appear to be a problem with the
XML I'm using. However, thanks to your efforts you have convinced me that
the problem can also be fixed by reviewing the stored proc and leaving my
XML as-is. Thus, this problem seems to have two solutions: change the XML or
change the sproc.

I will do a little more research on this issue, study what you have kindly
written (and thank you for taking the time you clearly took), and I will
reply with either more information or with the solution(s) I have found.

Regards,
-- Steve

"dd" <so*****@somewh ere.com> wrote in message
news:Nu******** ************@ne ws20.bellglobal .com...
Your problem is not the escape character, and it has nothing to do with
"pure" ASCII XML text. If your stored procedure has no errors and you are
passing your parameter properly, it should work without any problems. Here
is the code that I tried and it worked.

private SqlParameter CreateParameter (string sName, SqlDbType lType, int
iSize, ParameterDirect ion lDir,

bool bNullable, string sValue)

{

SqlParameter oParameter = new SqlParameter(sN ame, lType);

oParameter.Size = iSize;

oParameter.Dire ction = lDir;

oParameter.IsNu llable = bNullable;

oParameter.Valu e = sValue;

return oParameter;

}

private void button1_Click(o bject sender, System.EventArg s e)

{

string sString = "<?xml version=\"1.0\" ?><ROOT><UserDa ta
UserID=\"2282\" ><Tag1 QID=\"55111\">< Tag2
AID=\"5511101\" ></Tag2></Tag1><Tag1 QID=\"55112\">< Tag2
AID=\"5511217\" ></Tag2></Tag1><Tag1 QID=\"5512282\" ><Tag2
AID=\"551228206 \"></Tag2></Tag1><Tag1 QID=\"55114\">< Tag2
AID=\"5511406\" ></Tag2></Tag1><Tag1 QID=\"55115\">< Tag2
AID=\"5511505\" ></Tag2></Tag1></UserData></ROOT>";

SqlConnection oConn = new SqlConnection() ;

SqlCommand oCmd = new SqlCommand();

oConn.Connectio nString = "your connection string";

try{oConn.Open( );}

catch(Exception ex){string sException = ex.Message;};

oCmd.Connection = oConn;

oCmd.CommandTyp e = CommandType.Sto redProcedure;

oCmd.CommandTex t = "sp_Test";

oCmd.Parameters .Add(CreatePara meter("@StringI n", SqlDbType.VarCh ar, 900 ,
ParameterDirect ion.Input,

false, sString));

try

{

oCmd.ExecuteNon Query();

}

catch(System.Ex ception ex){string sException = ex.Message;}

oConn.Close();

oCmd.Dispose(); oConn.Dispose() ;

}

Here is the stored provedure:

CREATE PROCEDURE sp_Test

@StringIn varchar(900)
AS
DECLARE @hdoc int
--Create an internal representation of the XML document.
EXEC sp_xml_prepared ocument @hdoc OUTPUT, @StringIn
EXEC sp_xml_removedo cument @hDoc

GO

"Steve Litvack" <us************ @yahoo.com> wrote in message
news:Ps******** ************@tw ister.austin.rr .com...
No--it does not work. That is why I posted the message.

SQL Server reports:

Server: Msg 6603, Level 16, State 1, Procedure sp_xml_prepared ocument, Line
27

XML parsing error: A string literal was expected, but no opening quote
character was found.
If anyone has any ideas on how to generate the "pure" ASCII XML text I
requested, please let me know.

Thanks,
-- Steve

"dd" <so*****@somewh ere.com> wrote in message
news:uS******** ************@ne ws20.bellglobal .com...
It is the C# escape character, i.e. "\", as well as C and C++.
You do not have to replace it with anythng. Just leave it.
Just pass it to your stored procedure as is, it will work OK.

"Steve Litvack" <us************ @yahoo.com> wrote in message
news:RD******** ************@tw ister.austin.rr .com...
> Hello,
>
> I have built an XMLDocument object instance and I get the following

string
> when I examine the InnerXml property:
>
> <?xml version=\"1.0\" ?><ROOT><UserDa ta UserID=\"2282\" ><Tag1
> QID=\"55111\">< Tag2 AID=\"5511101\" ></Tag2></Tag1><Tag1
QID=\"55112\">< Tag2
> AID=\"5511217\" ></Tag2></Tag1><Tag1 QID=\"5512282\" ><Tag2
> AID=\"551228206 \"></Tag2></Tag1><Tag1 QID=\"55114\">< Tag2
> AID=\"5511406\" ></Tag2></Tag1><Tag1 QID=\"55115\">< Tag2
> AID=\"5511505\" ></Tag2></Tag1></UserData></ROOT>
>
> Notice that the double quotes are all escaped--that is they appear as >
> \"
>
> versus
>
> "
>
> I would like to "transform" or "convert" this string into a string in which
> the escape characters are "converted" . This would generate a string that > would appear like this:
>
> <?xml version="1.0"?> <ROOT><UserDa ta UserID="2282">< Tag1

QID="55111"><Ta g2
> AID="5511101"></Tag2></Tag1><Tag1 QID="55112"><Ta g2
> AID="5511217"></Tag2></Tag1><Tag1 QID="5512282">< Tag2
> AID="551228206" ></Tag2></Tag1><Tag1 QID="55114"><Ta g2
> AID="5511406"></Tag2></Tag1><Tag1 QID="55115"><Ta g2
> AID="5511505"></Tag2></Tag1></UserData></ROOT>
>
> I do not want to use a search/replace algorithm because I cannot be
entirely
> sure that there will not be escape sequences other than \" in the

string.
I
> am actually seeking a solution that would "transform" the \" to " (as I
> require) but also one that would convert \n to ASCII 10 and \r to ASCII 13.
> In other words, I would like to convert the escape-encoded string to
a > standard ASCII string.
>
> Moreover, why does the XMLDocument's InnerXml return an escape-encoded > string instead of a "straight" (unencoded) string? Is there a way to
get the
> InnerXml to return the "straight" string? I plan to pass the XML string
as
> an argument to a Sql stored procedure; therefore, the encoded string

does
> not work--I must use the unencoded version. Certainly others have
> encountered this problem--I just could not find a single solution and I > spend hours searching MSDN and Google! For example, I read some
other > threads that suggest using ActiveXMessageF ormatter, but not one of

them > actually explained how to do it--and pseudocode can only be so useful... >
> Thank you in advance for any assistance. I will confirm whether any
> suggestions work.
>
> Regards,
> Steve
>
>
>
>
>
>



Nov 15 '05 #9
dd
Steve,
If you pass your string, which is a string that contains escape codes, using
Command Parameters it will work OK.
The escape characters will be taken care of by the parameter object, and the
string will be passed to the stored procedure as it is supposed to be, i.e.
no escape characters will be passed to the stored procedure. Consequently,
XMLDoc object inside your stored procedure will take it. Just use
parameters, that's all.

"Steve Litvack" <us************ @yahoo.com> wrote in message
news:_y******** ************@tw ister.austin.rr .com...
OK... This obviously is one of those problems where the stored proc works
with "well-formed" (what I call "pure") XML yet does not work with XML
containing escape sequences. This made it appear to be a problem with the
XML I'm using. However, thanks to your efforts you have convinced me that
the problem can also be fixed by reviewing the stored proc and leaving my
XML as-is. Thus, this problem seems to have two solutions: change the XML or change the sproc.

I will do a little more research on this issue, study what you have kindly
written (and thank you for taking the time you clearly took), and I will
reply with either more information or with the solution(s) I have found.

Regards,
-- Steve

"dd" <so*****@somewh ere.com> wrote in message
news:Nu******** ************@ne ws20.bellglobal .com...
Your problem is not the escape character, and it has nothing to do with
"pure" ASCII XML text. If your stored procedure has no errors and you are
passing your parameter properly, it should work without any problems. Here is the code that I tried and it worked.

private SqlParameter CreateParameter (string sName, SqlDbType lType, int
iSize, ParameterDirect ion lDir,

bool bNullable, string sValue)

{

SqlParameter oParameter = new SqlParameter(sN ame, lType);

oParameter.Size = iSize;

oParameter.Dire ction = lDir;

oParameter.IsNu llable = bNullable;

oParameter.Valu e = sValue;

return oParameter;

}

private void button1_Click(o bject sender, System.EventArg s e)

{

string sString = "<?xml version=\"1.0\" ?><ROOT><UserDa ta
UserID=\"2282\" ><Tag1 QID=\"55111\">< Tag2
AID=\"5511101\" ></Tag2></Tag1><Tag1 QID=\"55112\">< Tag2
AID=\"5511217\" ></Tag2></Tag1><Tag1 QID=\"5512282\" ><Tag2
AID=\"551228206 \"></Tag2></Tag1><Tag1 QID=\"55114\">< Tag2
AID=\"5511406\" ></Tag2></Tag1><Tag1 QID=\"55115\">< Tag2
AID=\"5511505\" ></Tag2></Tag1></UserData></ROOT>";

SqlConnection oConn = new SqlConnection() ;

SqlCommand oCmd = new SqlCommand();

oConn.Connectio nString = "your connection string";

try{oConn.Open( );}

catch(Exception ex){string sException = ex.Message;};

oCmd.Connection = oConn;

oCmd.CommandTyp e = CommandType.Sto redProcedure;

oCmd.CommandTex t = "sp_Test";

oCmd.Parameters .Add(CreatePara meter("@StringI n", SqlDbType.VarCh ar, 900 , ParameterDirect ion.Input,

false, sString));

try

{

oCmd.ExecuteNon Query();

}

catch(System.Ex ception ex){string sException = ex.Message;}

oConn.Close();

oCmd.Dispose(); oConn.Dispose() ;

}

Here is the stored provedure:

CREATE PROCEDURE sp_Test

@StringIn varchar(900)
AS
DECLARE @hdoc int
--Create an internal representation of the XML document.
EXEC sp_xml_prepared ocument @hdoc OUTPUT, @StringIn
EXEC sp_xml_removedo cument @hDoc

GO

"Steve Litvack" <us************ @yahoo.com> wrote in message
news:Ps******** ************@tw ister.austin.rr .com...
No--it does not work. That is why I posted the message.

SQL Server reports:

Server: Msg 6603, Level 16, State 1, Procedure sp_xml_prepared ocument, Line
27

XML parsing error: A string literal was expected, but no opening quote
character was found.
If anyone has any ideas on how to generate the "pure" ASCII XML text I
requested, please let me know.

Thanks,
-- Steve

"dd" <so*****@somewh ere.com> wrote in message
news:uS******** ************@ne ws20.bellglobal .com...
> It is the C# escape character, i.e. "\", as well as C and C++.
> You do not have to replace it with anythng. Just leave it.
> Just pass it to your stored procedure as is, it will work OK.
>
> "Steve Litvack" <us************ @yahoo.com> wrote in message
> news:RD******** ************@tw ister.austin.rr .com...
> > Hello,
> >
> > I have built an XMLDocument object instance and I get the following string
> > when I examine the InnerXml property:
> >
> > <?xml version=\"1.0\" ?><ROOT><UserDa ta UserID=\"2282\" ><Tag1
> > QID=\"55111\">< Tag2 AID=\"5511101\" ></Tag2></Tag1><Tag1
> QID=\"55112\">< Tag2
> > AID=\"5511217\" ></Tag2></Tag1><Tag1 QID=\"5512282\" ><Tag2
> > AID=\"551228206 \"></Tag2></Tag1><Tag1 QID=\"55114\">< Tag2
> > AID=\"5511406\" ></Tag2></Tag1><Tag1 QID=\"55115\">< Tag2
> > AID=\"5511505\" ></Tag2></Tag1></UserData></ROOT>
> >
> > Notice that the double quotes are all escaped--that is they appear as > >
> > \"
> >
> > versus
> >
> > "
> >
> > I would like to "transform" or "convert" this string into a string in > which
> > the escape characters are "converted" . This would generate a string that
> > would appear like this:
> >
> > <?xml version="1.0"?> <ROOT><UserDa ta UserID="2282">< Tag1
QID="55111"><Ta g2
> > AID="5511101"></Tag2></Tag1><Tag1 QID="55112"><Ta g2
> > AID="5511217"></Tag2></Tag1><Tag1 QID="5512282">< Tag2
> > AID="551228206" ></Tag2></Tag1><Tag1 QID="55114"><Ta g2
> > AID="5511406"></Tag2></Tag1><Tag1 QID="55115"><Ta g2
> > AID="5511505"></Tag2></Tag1></UserData></ROOT>
> >
> > I do not want to use a search/replace algorithm because I cannot
be > entirely
> > sure that there will not be escape sequences other than \" in the
string.
> I
> > am actually seeking a solution that would "transform" the \" to " (as
I
> > require) but also one that would convert \n to ASCII 10 and \r to

ASCII
> 13.
> > In other words, I would like to convert the escape-encoded string to a > > standard ASCII string.
> >
> > Moreover, why does the XMLDocument's InnerXml return an escape-encoded > > string instead of a "straight" (unencoded) string? Is there a way
to get
> the
> > InnerXml to return the "straight" string? I plan to pass the XML

string
as
> > an argument to a Sql stored procedure; therefore, the encoded

string does
> > not work--I must use the unencoded version. Certainly others have
> > encountered this problem--I just could not find a single solution

and
I
> > spend hours searching MSDN and Google! For example, I read some

other > > threads that suggest using ActiveXMessageF ormatter, but not one of

them
> > actually explained how to do it--and pseudocode can only be so

useful...
> >
> > Thank you in advance for any assistance. I will confirm whether any > > suggestions work.
> >
> > Regards,
> > Steve
> >
> >
> >
> >
> >
> >
>
>



Nov 15 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
4889
by: yawnmoth | last post by:
say i have a for loop that would iterate through every character and put a space between every 80th one, in effect forcing word wrap to occur. this can be implemented easily using a regular expression. if i wanted to improve on this, and make it so stuff in url's didn't count towards that 80 character limit, a regular expression would not suffice. however, a simple for loop does. so now i'm currious how to account for html escape...
2
7727
by: Daniel | last post by:
I'm working with strings that contain xml escape codes, such as '0' and need a way in python to unescape these back to their ascii representation, such as '&' but can't seem to find a python method for this. I tried xml.sax.saxutils.unescape(s), but while it works with '&amp;', it doesn't work with '0' and other numeric codes. Any suggestions on how to decode the numeric xml escape codes such as this? Thanks. -- To reply to me directly,...
2
2407
by: Felix | last post by:
If I set a breakpoint in visual studio 2000 and viewed a local variable (in the "locals" panel), I would see something like: sql | " SELECT Operator.FirstName, .... now I am using visual studio 2003, I see something like:
5
6375
by: Steve Litvack | last post by:
Hello, I have built an XMLDocument object instance and I get the following string when I examine the InnerXml property: <?xml version=\"1.0\"?><ROOT><UserData UserID=\"2282\"><Tag1 QID=\"55111\"><Tag2 AID=\"5511101\"></Tag2></Tag1><Tag1 QID=\"55112\"><Tag2 AID=\"5511217\"></Tag2></Tag1><Tag1 QID=\"5512282\"><Tag2 AID=\"551228206\"></Tag2></Tag1><Tag1 QID=\"55114\"><Tag2 AID=\"5511406\"></Tag2></Tag1><Tag1 QID=\"55115\"><Tag2
7
96308
by: teachtiro | last post by:
Hi, 'C' says \ is the escape character to be used when characters are to be interpreted in an uncommon sense, e.g. \t usage in printf(), but for printing % through printf(), i have read that %% should be used. Wouldn't it have been better (from design perspective) if the same escape character had been used in this case too. Forgive me for posting without verfying things with any standard compiler, i don't have the means for now.
0
1976
by: Steve Litvack | last post by:
Hello, I have built an XMLDocument object instance and I get the following string when I examine the InnerXml property: <?xml version=\"1.0\"?><ROOT><UserData UserID=\"2282\"><Tag1 QID=\"55111\"><Tag2 AID=\"5511101\"></Tag2></Tag1><Tag1 QID=\"55112\"><Tag2 AID=\"5511217\"></Tag2></Tag1><Tag1 QID=\"5512282\"><Tag2 AID=\"551228206\"></Tag2></Tag1><Tag1 QID=\"55114\"><Tag2 AID=\"5511406\"></Tag2></Tag1><Tag1 QID=\"55115\"><Tag2
4
7469
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> Thanks.
3
2243
by: Guadala Harry | last post by:
I'd like to know the answer to the following question so I can know what to expect with regard to other similar uses of escape characters and strings. While everything works fine - I'd like to know specifically why: I am building a simple HTML table in my C# code-behind by concatenating strings that contain different parts of the table and table content... something like this: string myTable = "<table width=\"100%\" border=\"0\"...
1
2449
by: marcvill | last post by:
I need to send printer specific escape codes a printer for a POS register. Can anyone tell me how to send these codes to a printer using VB .NET and the Win32 spooler functions? I have looked at the MS article 322090 on how to do this but the supplied code doesn't work for the second button. Please let me know if there are any other resources on Windows printing. It would be greatly apreciated. Thanks for any and all help.
0
8623
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9187
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8894
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6544
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5879
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3071
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 we have to send another system
2
2361
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2015
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.