Creating Backup SQL manually

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 ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-04-2008
ist
 
Posts: n/a
Default Creating Backup SQL manually

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...
Reply With Quote
  #2 (permalink)  
Old 03-07-2008
lark
 
Posts: n/a
Default Re: Creating Backup SQL manually

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
Reply With Quote
  #3 (permalink)  
Old 03-18-2008
ist
 
Posts: n/a
Default Re: Creating Backup SQL manually

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 -


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:17 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0