escape character
-
hi i have to insert a string into database but while inserting it is not allowing me to insert as ther is some special characters and my main problem is string contains ( ' ) this character .i am in need of escape characters in vb.net thanks
with regards Balagurunathan.B
-
hi i have to insert a string into database but while inserting it is not allowing me to insert as ther is some special characters and my main problem is string contains ( ' ) this character .i am in need of escape characters in vb.net thanks
with regards Balagurunathan.B
Hi, You can try
Asc(27)
orChar(Asc(27))
orChar("ESC")
. Good luck, JohanMy advice is free, and you may get what you paid for.
-
Hi, You can try
Asc(27)
orChar(Asc(27))
orChar("ESC")
. Good luck, JohanMy advice is free, and you may get what you paid for.
-
Hi, You can try
Asc(27)
orChar(Asc(27))
orChar("ESC")
. Good luck, JohanMy advice is free, and you may get what you paid for.
hi now i will say very clearly i want to insert a string into database for eg its a program and i am going to insert in a memo field the string contains many spl char the single quotes is my big problem( ' ) i want to use some escape char so i can save asit into databse and retrive the content simillar to original string insert in c# we use @ or \\ wat we will be using in vb.net
with regards Balagurunathan.B
-
HI SHOULD I HAVE TO REPLACE COMMAND I NEE THE ORIGINAL CONTENTS BACK WHILE RETRIVING IN C# WE USE \\ R @ CHAR WAT HAVE TO USE FOR THIS
with regards Balagurunathan.B
Hi Balagurunathan, No need to shout, I can hear you just fine (please press your Caps Lock key). It seems that I did not quite understand you. You are not looking to identify the Escape character but the ' character. In VB.NET you can use the Replace method:
YourString.Replace("'", "´")
The first string is the string (or character) that you want to remove, and the second string is the string that you want to put in its place. If you only want to remove a certain string or character from a String you could try:YourString.Replace("'", "")
JohanMy advice is free, and you may get what you paid for.
-
Hi Balagurunathan, No need to shout, I can hear you just fine (please press your Caps Lock key). It seems that I did not quite understand you. You are not looking to identify the Escape character but the ' character. In VB.NET you can use the Replace method:
YourString.Replace("'", "´")
The first string is the string (or character) that you want to remove, and the second string is the string that you want to put in its place. If you only want to remove a certain string or character from a String you could try:YourString.Replace("'", "")
JohanMy advice is free, and you may get what you paid for.
see i can use replace command for that but the thing is before storing i will concat the string by line by line as how the program will look so at that time i can replace it but while retriving it will be like a full program so now i am not able to replace its the problem so i am trying to use escape character
with regards Balagurunathan.B
-
see i can use replace command for that but the thing is before storing i will concat the string by line by line as how the program will look so at that time i can replace it but while retriving it will be like a full program so now i am not able to replace its the problem so i am trying to use escape character
with regards Balagurunathan.B
Where are you retrieving the text from, a database, a file or a TextBox?
My advice is free, and you may get what you paid for.
-
Where are you retrieving the text from, a database, a file or a TextBox?
My advice is free, and you may get what you paid for.
really its a program i am reading line by line i have to store some part of code into database so in some circumstance i will display those part to the endusers some times i have to retrive values from buffer and have to store in database and have to display it later to enduser for the purpose i need escape character which will store as it and so no need to replace again by searching and all
with regards Balagurunathan.B
-
really its a program i am reading line by line i have to store some part of code into database so in some circumstance i will display those part to the endusers some times i have to retrive values from buffer and have to store in database and have to display it later to enduser for the purpose i need escape character which will store as it and so no need to replace again by searching and all
with regards Balagurunathan.B
Hi, I am sorry, I am trying to help you, but I am not sure what you mean. Are you trying to read VB.NET code programmatically, and then insert it into a database? Is the problem that the VB.NET code contains ' characters (comments in VB.NET)? Does you application need to show existing code to a user, allow the user to modify the code, and if he wants, let the user save the modified code into the database? In other words, the code may contain ' characters when you have to read it, and/or it may contain ' characters when you insert it (back) into a database? Please can you clarify? Johan
My advice is free, and you may get what you paid for.
-
hi i have to insert a string into database but while inserting it is not allowing me to insert as ther is some special characters and my main problem is string contains ( ' ) this character .i am in need of escape characters in vb.net thanks
with regards Balagurunathan.B
-
hi i have to insert a string into database but while inserting it is not allowing me to insert as ther is some special characters and my main problem is string contains ( ' ) this character .i am in need of escape characters in vb.net thanks
with regards Balagurunathan.B
Well as far as i understand, u need to replace (') by ?('') (two single quotes) before storing it into database. ('') is nothing but the escape sequence for (') in Database (not i \n Vb.net). I guess this will solve the problem.
"If our Mind can, the Program can !!"