dbTalk Databases Forums  

R: Re: R: Re: R: Re: odbc - mysql - database engine stopped theprocess ..

comp.databases.ms-access comp.databases.ms-access


Discuss R: Re: R: Re: R: Re: odbc - mysql - database engine stopped theprocess .. in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
informatix
 
Posts: n/a

Default R: Re: R: Re: R: Re: odbc - mysql - database engine stopped theprocess .. - 05-30-2011 , 04:46 PM






Hello ,

the "insert into" statment on my ms access 2007 don't accept multiple values:
- INSERT INTO tab (campo1,campo2) VALUES (valore1, valore2)
works fine, but ..
- INSERT INTO tab (campo1,campo2) VALUES (valore1, valore2),(valoreb1,valoreb2)
don't work

Reply With Quote
  #2  
Old   
John Spencer
 
Posts: n/a

Default Re: R: Re: R: Re: R: Re: odbc - mysql - database engine stopped theprocess .. - 05-30-2011 , 05:37 PM






That is correct. That syntax will only insert ONE record and ONE set of values.


John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

On 5/30/2011 5:46 PM, informatix wrote:
Quote:
Hello ,

the "insert into" statment on my ms access 2007 don't accept multiple values:
- INSERT INTO tab (campo1,campo2) VALUES (valore1, valore2)
works fine, but ..
- INSERT INTO tab (campo1,campo2) VALUES (valore1, valore2),(valoreb1,valoreb2)
don't work

Reply With Quote
  #3  
Old   
The Frog
 
Posts: n/a

Default Re: R: Re: R: Re: R: Re: odbc - mysql - database engine stopped theprocess .. - 05-31-2011 , 03:38 AM



MySQL can accept multiple 'rows' in a single INSERT statement (http://
dev.mysql.com/doc/refman/5.5/en/insert.html), but perhaps this is only
on newer versions of the server. What version are you using
Informatix?

The Frog

Reply With Quote
  #4  
Old   
John Spencer
 
Posts: n/a

Default Re: R: Re: R: Re: R: Re: odbc - mysql - database engine stopped theprocess .. - 05-31-2011 , 07:20 AM



Then I would guess you would need to use a pass-through query if you are using
an odbc connection.


John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

On 5/31/2011 4:38 AM, The Frog wrote:
Quote:
MySQL can accept multiple 'rows' in a single INSERT statement (http://
dev.mysql.com/doc/refman/5.5/en/insert.html), but perhaps this is only
on newer versions of the server. What version are you using
Informatix?

The Frog

Reply With Quote
  #5  
Old   
The Frog
 
Posts: n/a

Default Re: R: Re: R: Re: R: Re: odbc - mysql - database engine stopped theprocess .. - 05-31-2011 , 07:54 AM



It should be done by db.execute. It could also be done as a
passthrough with a query object. What I have usually found when
constructing multiple row insert statements is that there is often an
extra comma or some such in the constructed SQL. Perhaps Informatix
can place a break point in the code just before the .execute method
and post the SQL that is created for us to have a look at?

If we need to shift it to a query object then that is also not
difficult to do, but unlesss we know that the SQL is properly formed
then it wont matter how we try to send the command to the server it
just wont work.

The Frog

Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.