473,698 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dump file to access table

Hi All,

I have a mysql dump file... something like.

_______________ _______________ _______________ _____
CREATE TABLE nation (
ip int(11) unsigned NOT NULL default '0',
country char(2) NOT NULL default '',
KEY ip (ip)
);

INSERT INTO nation (ip, country) VALUES(0, 'us');
INSERT INTO nation (ip, country) VALUES(70044876 8, 'za');
INSERT INTO nation (ip, country) VALUES(70146457 6, 'mu');
INSERT INTO nation (ip, country) VALUES(70147276 8, 'tg');
_______________ _______________ _______________ _______

Now i want to run this dump on access and have corresponding table
there..

Is there a wat to do this.
If not, then what exactly can be done to transfer the table.
I can see myself writing a code for it... but isn't there some
automatic(inbui lt) process ?

May 19 '06 #1
9 2332
No. At least not as far as I know, but I do feel more
ignorant with each day that passes.

If the dump file isn't to big you could try copy and pasting
it into Access query designers' SQL view and see what
happens.

--
Nick Coe (UK)
http://www.alphacos.co.uk/
AccHelp is now free/donateware

In
news:11******** **************@ g10g2000cwb.goo glegroups.com,
Shivam typed:
Hi All,

I have a mysql dump file... something like.

_______________ _______________ _______________ _____
CREATE TABLE nation (
ip int(11) unsigned NOT NULL default '0',
country char(2) NOT NULL default '',
KEY ip (ip)
);

INSERT INTO nation (ip, country) VALUES(0, 'us');
INSERT INTO nation (ip, country) VALUES(70044876 8, 'za');
INSERT INTO nation (ip, country) VALUES(70146457 6, 'mu');
INSERT INTO nation (ip, country) VALUES(70147276 8, 'tg');
_______________ _______________ _______________ _______

Now i want to run this dump on access and have
corresponding
table there..

Is there a wat to do this.
If not, then what exactly can be done to transfer the
table.
I can see myself writing a code for it... but isn't there
some
automatic(inbui lt) process ?

May 19 '06 #2
"Shivam" <sh************ **@gmail.com> wrote in
news:11******** **************@ g10g2000cwb.goo glegroups.com:
Hi All,

I have a mysql dump file... something like.

_______________ _______________ _______________ _____
CREATE TABLE nation (
ip int(11) unsigned NOT NULL default '0',
country char(2) NOT NULL default '',
KEY ip (ip)
);

INSERT INTO nation (ip, country) VALUES(0, 'us');
INSERT INTO nation (ip, country) VALUES(70044876 8, 'za');
INSERT INTO nation (ip, country) VALUES(70146457 6, 'mu');
INSERT INTO nation (ip, country) VALUES(70147276 8, 'tg');
_______________ _______________ _______________ _______

Now i want to run this dump on access and have corresponding
table there..

Is there a wat to do this.
If not, then what exactly can be done to transfer the table.
I can see myself writing a code for it... but isn't there some
automatic(inbui lt) process ?

Import the file into a one field access table.
write a sub that reads a record from this table, and stuffs the
contents into a variable. (strsql for example)

If the last character is a semicolon, execute the sql statement
docmd.runsql strsql.

otherwise, concatenate the next row of the table into the
variable.
strsql = strsql & nextline

loop through the recordset
--
Bob Quintal

PA is y I've altered my email address.
May 19 '06 #3
Good intuition Bob,

....the only thing is that perhaps it needs some slight refinements to
work in some cases.
For instance, if you have the command:
INSERT INTO nation (id, sentence) VALUES(1, "Keywords: Access;
Programming; Log");

split as:

INSERT INTO nation (id, sentence) VALUES(1, "Keywords: Access;

Programming; Log");

Would it be easy to perfection your logic to deal with that?

-tom

Bob Quintal ha scritto:
"Shivam" <sh************ **@gmail.com> wrote in
news:11******** **************@ g10g2000cwb.goo glegroups.com:
Hi All,

I have a mysql dump file... something like.

_______________ _______________ _______________ _____
CREATE TABLE nation (
ip int(11) unsigned NOT NULL default '0',
country char(2) NOT NULL default '',
KEY ip (ip)
);

INSERT INTO nation (ip, country) VALUES(0, 'us');
INSERT INTO nation (ip, country) VALUES(70044876 8, 'za');
INSERT INTO nation (ip, country) VALUES(70146457 6, 'mu');
INSERT INTO nation (ip, country) VALUES(70147276 8, 'tg');
_______________ _______________ _______________ _______

Now i want to run this dump on access and have corresponding
table there..

Is there a wat to do this.
If not, then what exactly can be done to transfer the table.
I can see myself writing a code for it... but isn't there some
automatic(inbui lt) process ?

Import the file into a one field access table.
write a sub that reads a record from this table, and stuffs the
contents into a variable. (strsql for example)

If the last character is a semicolon, execute the sql statement
docmd.runsql strsql.

otherwise, concatenate the next row of the table into the
variable.
strsql = strsql & nextline

loop through the recordset
--
Bob Quintal

PA is y I've altered my email address.


May 19 '06 #4
to************* *@uniroma1.it wrote in
news:11******** *************@j 73g2000cwa.goog legroups.com:

Good intuition Bob,

...the only thing is that perhaps it needs some slight
refinements to work in some cases.
For instance, if you have the command:
INSERT INTO nation (id, sentence) VALUES(1, "Keywords: Access;
Programming; Log");

split as:

INSERT INTO nation (id, sentence) VALUES(1, "Keywords: Access;

Programming; Log");

Would it be easy to perfection your logic to deal with that?

-tom
I'm sure a good programmer could write enough tests to make it
automatically resolve such issues, Sometimes, it may be quicker
to find and manually fix the data than write and debug code.


Bob Quintal ha scritto:
"Shivam" <sh************ **@gmail.com> wrote in
news:11******** **************@ g10g2000cwb.goo glegroups.com:
> Hi All,
>
> I have a mysql dump file... something like.
>
> _______________ _______________ _______________ _____
> CREATE TABLE nation (
> ip int(11) unsigned NOT NULL default '0',
> country char(2) NOT NULL default '',
> KEY ip (ip)
> );
>
> INSERT INTO nation (ip, country) VALUES(0, 'us');
> INSERT INTO nation (ip, country) VALUES(70044876 8, 'za');
> INSERT INTO nation (ip, country) VALUES(70146457 6, 'mu');
> INSERT INTO nation (ip, country) VALUES(70147276 8, 'tg');
> _______________ _______________ _______________ _______
>
> Now i want to run this dump on access and have
> corresponding table there..
>
> Is there a wat to do this.
> If not, then what exactly can be done to transfer the
> table. I can see myself writing a code for it... but isn't
> there some automatic(inbui lt) process ?
>

Import the file into a one field access table.
write a sub that reads a record from this table, and stuffs
the contents into a variable. (strsql for example)

If the last character is a semicolon, execute the sql
statement docmd.runsql strsql.

otherwise, concatenate the next row of the table into the
variable.
strsql = strsql & nextline

loop through the recordset
--
Bob Quintal

PA is y I've altered my email address.



--
Bob Quintal

PA is y I've altered my email address.
May 20 '06 #5
Right, it's true! :)

-tom

Bob Quintal ha scritto:
to************* *@uniroma1.it wrote in
news:11******** *************@j 73g2000cwa.goog legroups.com:

Good intuition Bob,

...the only thing is that perhaps it needs some slight
refinements to work in some cases.
For instance, if you have the command:
INSERT INTO nation (id, sentence) VALUES(1, "Keywords: Access;
Programming; Log");

split as:

INSERT INTO nation (id, sentence) VALUES(1, "Keywords: Access;

Programming; Log");

Would it be easy to perfection your logic to deal with that?

-tom


I'm sure a good programmer could write enough tests to make it
automatically resolve such issues, Sometimes, it may be quicker
to find and manually fix the data than write and debug code.


Bob Quintal ha scritto:
"Shivam" <sh************ **@gmail.com> wrote in
news:11******** **************@ g10g2000cwb.goo glegroups.com:

> Hi All,
>
> I have a mysql dump file... something like.
>
> _______________ _______________ _______________ _____
> CREATE TABLE nation (
> ip int(11) unsigned NOT NULL default '0',
> country char(2) NOT NULL default '',
> KEY ip (ip)
> );
>
> INSERT INTO nation (ip, country) VALUES(0, 'us');
> INSERT INTO nation (ip, country) VALUES(70044876 8, 'za');
> INSERT INTO nation (ip, country) VALUES(70146457 6, 'mu');
> INSERT INTO nation (ip, country) VALUES(70147276 8, 'tg');
> _______________ _______________ _______________ _______
>
> Now i want to run this dump on access and have
> corresponding table there..
>
> Is there a wat to do this.
> If not, then what exactly can be done to transfer the
> table. I can see myself writing a code for it... but isn't
> there some automatic(inbui lt) process ?
>
Import the file into a one field access table.
write a sub that reads a record from this table, and stuffs
the contents into a variable. (strsql for example)

If the last character is a semicolon, execute the sql
statement docmd.runsql strsql.

otherwise, concatenate the next row of the table into the
variable.
strsql = strsql & nextline

loop through the recordset
--
Bob Quintal

PA is y I've altered my email address.



--
Bob Quintal

PA is y I've altered my email address.


May 20 '06 #6
rkc
to************* *@uniroma1.it wrote:
Good intuition Bob,

...the only thing is that perhaps it needs some slight refinements to
work in some cases.
For instance, if you have the command:
INSERT INTO nation (id, sentence) VALUES(1, "Keywords: Access;
Programming; Log");

split as:

INSERT INTO nation (id, sentence) VALUES(1, "Keywords: Access;

Programming; Log");

Would it be easy to perfection your logic to deal with that?

-tom

Bob Quintal ha scritto:

"Shivam" <sh************ **@gmail.com> wrote in
news:11****** *************** *@g10g2000cwb.g ooglegroups.com :

Hi All,

I have a mysql dump file... something like.

____________ _______________ _______________ ________
CREATE TABLE nation (
ip int(11) unsigned NOT NULL default '0',
country char(2) NOT NULL default '',
KEY ip (ip)
);

INSERT INTO nation (ip, country) VALUES(0, 'us');
INSERT INTO nation (ip, country) VALUES(70044876 8, 'za');
INSERT INTO nation (ip, country) VALUES(70146457 6, 'mu');
INSERT INTO nation (ip, country) VALUES(70147276 8, 'tg');
____________ _______________ _______________ __________

Now i want to run this dump on access and have corresponding
table there..

Is there a wat to do this.
If not, then what exactly can be done to transfer the table.
I can see myself writing a code for it... but isn't there some
automatic(in built) process ?


Import the file into a one field access table.
write a sub that reads a record from this table, and stuffs the
contents into a variable. (strsql for example)

If the last character is a semicolon, execute the sql statement
docmd.runsq l strsql.

otherwise, concatenate the next row of the table into the
variable.
strsql = strsql & nextline

loop through the recordset
--
Bob Quintal

PA is y I've altered my email address.


Load the text file into one string variable and Split on ");"


May 20 '06 #7
rkc <rk*@rochester. yabba.dabba.do. rr.bomb> wrote in
news:bZ******** ********@twiste r.nyroc.rr.com:
"Shivam" <sh************ **@gmail.com> wrote in
news:11***** *************** **@g10g2000cwb. googlegroups.co m:
Hi All,

I have a mysql dump file... something like.

___________ _______________ _______________ _________
CREATE TABLE nation (
ip int(11) unsigned NOT NULL default '0',
country char(2) NOT NULL default '',
KEY ip (ip)
);

INSERT INTO nation (ip, country) VALUES(0, 'us');
INSERT INTO nation (ip, country) VALUES(70044876 8, 'za');
INSERT INTO nation (ip, country) VALUES(70146457 6, 'mu');
INSERT INTO nation (ip, country) VALUES(70147276 8, 'tg');
___________ _______________ _______________ ___________


Load the text file into one string variable and Split on ");"

I've seen some of these dump files exceed 10Megabytes, I would
not want to get tied up in that much string.

--
Bob Quintal

PA is y I've altered my email address.
May 20 '06 #8
rkc
Bob Quintal wrote:
rkc <rk*@rochester. yabba.dabba.do. rr.bomb> wrote in
news:bZ******** ********@twiste r.nyroc.rr.com:


Load the text file into one string variable and Split on ");"


I've seen some of these dump files exceed 10Megabytes, I would
not want to get tied up in that much string.


I think a little common sense would provide a solution to that.
May 20 '06 #9
Hi Shivam,

If you send me the dump text file (zipped), I can do it for you
(clearly for free) and send you back the Access file.

-t

Shivam ha scritto:
Hi All,

I have a mysql dump file... something like.

_______________ _______________ _______________ _____
CREATE TABLE nation (
ip int(11) unsigned NOT NULL default '0',
country char(2) NOT NULL default '',
KEY ip (ip)
);

INSERT INTO nation (ip, country) VALUES(0, 'us');
INSERT INTO nation (ip, country) VALUES(70044876 8, 'za');
INSERT INTO nation (ip, country) VALUES(70146457 6, 'mu');
INSERT INTO nation (ip, country) VALUES(70147276 8, 'tg');
_______________ _______________ _______________ _______

Now i want to run this dump on access and have corresponding table
there..

Is there a wat to do this.
If not, then what exactly can be done to transfer the table.
I can see myself writing a code for it... but isn't there some
automatic(inbui lt) process ?


May 22 '06 #10

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

Similar topics

0
6809
by: Ravi Tallury | last post by:
Hi We are having issues with our application, certain portions of it stop responding while the rest of the application is fine. I am attaching the Java Core dump. If someone can let me know what the issue is. Thanks Ravi
10
2438
by: Ryan | last post by:
We are planning on moving to a different server and was wondering if there was a way to make an archived dump of the database? If so, how would one go about doing such a thing. Thanks, Ryan
0
3231
by: Johnson, Shaunn | last post by:
Howdy: Running PostgreSQL 7.3.3 on RedHat Linux 7.2 I'm trying to dump a table out with the insert statements imbedded and I'm not having any success. The man page for pg_dump says to use: -d / -D to add the inserts (and values)
2
2560
by: D. Dante Lorenso | last post by:
First I created a function that selected the next available pin code from a table of pre-defined pin codes: CREATE FUNCTION "public"."get_next_pin_code" () RETURNS varchar AS' DECLARE my_pin_code VARCHAR; BEGIN ... /* this is the pincode we just fetched */ RETURN (my_pin_code);
15
2369
by: MLH | last post by:
In this forum, under a different subject title, I have explored the following: I want to examine each procedure in my class modules and standard modules (A97) Since the other subject title was substantially different from this objective, I have posted my topic as a new thread more appropriately titled. Question: Can someone tell me how I can DUMP all my standard and class
6
3531
by: Együd Csaba | last post by:
Hi All, I'd like to dump out my database using plain text format. Everything is ok, but the bytea filds. Restoring the dump file (using <<psql -f LO_TRY_INSERT_BYTEA.sql tmp7>>) it sends an error message like psql:LO_TRY_INSERT_BYTEA.sql:14: ERROR: Bad input string for type bytea Trying dumping with copy commands it sends this error: psql:LO_TRY_COPY_BYTEA.sql:13: lost synchronization with server, resetting
2
5784
by: Auddog | last post by:
Hello all, I'm fairly new to access database(s), but I work a lot with mysql. I was wondering if there is a script file out there that I can get a hold of that will create a dump file. I need to be able to backup this data nightly and would like it if the script file could name the file with that days date (so each dump file would be unique). I thank you for any help that you might be able to provide. A
4
2224
by: pwpradeep | last post by:
Hello, I have database in Ms Access. I create a tables using wizards. So, now, how can i take a dump of that database. Please, guide me. Thanks in advance.
1
3758
by: TYR | last post by:
I have a large dump file that originated in a MySQL db; I need to get it into an SQLite file. Various options are suggested around the web; none of them seem to work (most failing to import the thing in the first place). So I removed the assorted taggery from each end, leaving just a big text file taking the following format: ('value', 'value', 'value, 'value'), ('value','value','value','value')...
0
8598
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
9016
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8887
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7709
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5858
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
4613
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3037
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
2321
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1997
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.