This is a discussion on Creating Backup SQL manually within the MySQL Database forums, part of the Database Forums category; Hi, I wish to create exactly the same SQL that backup module of PHPMyAdmin creates. I want to achieve it ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi,
I wish to create exactly the same SQL that backup module of PHPMyAdmin creates. I want to achieve it with ASP.NET, I have tried many times and get the nearest result with MyODBC driver. However, I am having problems with special characters (because the field contains encoded data), for example; -I have noticed that PHPMyAdmin creates SQL codes with \n characters, ASP.NET converts them to line breaks. I have corrected this by replacing \n's with \\n in ASP.NET -Similar situations occur in \ and ' characters, corrected them by replacing. -In PhpMyAdmin, there is a box character for an ASCII code, this occurs in ASP.NET as \b and so ASP.NET renders it as backspace. The third situation is weird, I haven't found how to handle it in a generic way. For example, I can manually replace \b's with box character, however this is only one situation and I may be missing many other special cases like this. So, the bottom line: How can I achieve exactly same SQL code with ASP.NET? Is there a special SQL Query for this (I am not talking about Backin-up to files), or if I have to do it manually, can I get a complete reference? Thanks... |
|
|||
|
ist wrote:
> Hi, > I wish to create exactly the same SQL that backup module of PHPMyAdmin > creates. I want to achieve it with ASP.NET, I have tried many times > and get the nearest result with MyODBC driver. However, I am having > problems with special characters (because the field contains encoded > data), for example; > > -I have noticed that PHPMyAdmin creates SQL codes with \n characters, > ASP.NET converts them to line breaks. I have corrected this by > replacing \n's with \\n in ASP.NET > -Similar situations occur in \ and ' characters, corrected them by > replacing. > -In PhpMyAdmin, there is a box character for an ASCII code, this > occurs in ASP.NET as \b and so ASP.NET renders it as backspace. > > The third situation is weird, I haven't found how to handle it in a > generic way. For example, I can manually replace \b's with box > character, however this is only one situation and I may be missing > many other special cases like this. > > So, the bottom line: How can I achieve exactly same SQL code with > ASP.NET? Is there a special SQL Query for this (I am not talking about > Backin-up to files), or if I have to do it manually, can I get a > complete reference? > > Thanks... don't understand your question complete but here's my two cents: you can do is replace all of them "\b" to whatever you like before running your query |
|
|||
|
Hi,
You are right, the only problem is this, I don't have an exact list of "what to replace", because mysqladmin's backup keeps some ascii characters, replaces some other. I need to know what are these 'some's :) Thanks. On 7 Mart, 21:17, lark <ham...@sbcglobal.net> wrote: > ist wrote: > > Hi, > > I wish to create exactly the same SQL that backup module of PHPMyAdmin > > creates. I want to achieve it with ASP.NET, I have tried many times > > and get the nearest result with MyODBC driver. However, I am having > > problems with special characters (because the field contains encoded > > data), for example; > > > -I have noticed that PHPMyAdmin creates SQL codes with \n characters, > > ASP.NET converts them to line breaks. I have corrected this by > > replacing \n's with \\n in ASP.NET > > -Similar situations occur in \ and ' characters, corrected them by > > replacing. > > -In PhpMyAdmin, there is a box character for an ASCII code, this > > occurs in ASP.NET as \b and so ASP.NET renders it as backspace. > > > The third situation is weird, I haven't found how to handle it in a > > generic way. For example, I can manually replace \b's with box > > character, however this is only one situation and I may be missing > > many other special cases like this. > > > So, the bottom line: How can I achieve exactly same SQL code with > > ASP.NET? Is there a special SQL Query for this (I am not talking about > > Backin-up to files), or if I have to do it manually, can I get a > > complete reference? > > > Thanks... > > don't understand your question complete but here's my two cents: > you can do is replace all of them "\b" to whatever you like before > running your query- Alıntıyı gizle - > > - Alıntıyı göster - |