List:MySQL ODBC« Previous MessageNext Message »
From:Ed Kraft Date:June 18 2003 9:55pm
Subject:RE: 126 error code?
View as plain text  
Thanks for the feedback.

So by what this says, a .dll file could be the issue.  If I have a mySQL
db running at the same time I'm trying to install the client myODBC
driver, there could be a conflict between the two.

I'll try shutting down the db, reinstalling the driver, and see if that
works.

Thanks Again,

Ed


-----Original Message-----
From: Venu [mailto:venu@stripped] 
Sent: Wednesday, June 18, 2003 11:24 AM
To: Mike Hillyer
Cc: Ed Kraft; myodbc@stripped
Subject: Re: 126 error code?


On Wed, Jun 18, 2003 at 12:06:57PM -0600, Mike Hillyer wrote:
> Looks like it is a registry problem, at least that is what a Google 
> search leads me to believe. Try a re-install of the driver and see if 
> that does it.

Here is the reason for this:
http://www.mysql.com/products/myodbc/faq_3.html#Setup-error

PS: I will add error code 126 for this Q&A, so thatit is searchable.

Thanks

> 
> Regards,
> Mike Hillyer
> www.vbmysql.com
> 
> 
> > -----Original Message-----
> > From: Ed Kraft [mailto:ekraft@stripped]
> > Sent: Wednesday, June 18, 2003 2:56 PM
> > To: myodbc@stripped
> > Subject: 126 error code?
> > 
> > 
> > Hey All,
> > 
> > Does anyone know what this means exactly?  :
> > 
> > Error Type:
> > Microsoft OLE DB Provider for ODBC Drivers (0x80004005) Specified 
> > driver could not be loaded due to system error 126 (MySQL ODBC
> > 3.51 Driver).
> > 
> > I got this error when I tried installing myODBC on our Windows 
> > server. I receive this error in the ASP page I have, and also when I

> > try and setup a DSN in IIS.  The only thing I could find out about 
> > this error code is that is has something to do with an invalid file 
> > format.  Is there a different driver I need for a server?
> > 
> > Any help would be much appreciated.
> > 
> > Thanks,
> > 
> > Ed
> > 
> > 
> > -----Original Message-----
> > From: Raj Muchhala [mailto:Raj.Muchhala@stripped]
> > Sent: Wednesday, June 18, 2003 10:10 AM
> > To: 'myodbc@stripped'
> > Subject: .Net, myodbc, & last_insert_id()
> > 
> > 
> > The "last_insert_id()" command does not appear to be working.
> >  If I run
> > an insert through MyODBC and immediately follow it with a "SELECT
> > last_insert_id()" nothing is returned.  Even more interestingly, if
I
> > run the insert through MyODBC and do the last_insert_id via a MySql
> > console nothing is returned.  But, if I do both via a MySql 
> > console, it
> > works fine AND repeated calls to last_insert_id on the 
> > console will ONLY
> > return values from inserts done via the console.  This tells 
> > me that the
> > MyODBC driver is not "registering", somehow, an insert command...
> > hopefully the above was not too confusing.  Here are some specifics:
> >  
> > Using DBToolsManager as a GUI console to MySQL.
> >  
> > Using .Net platform, C# and MyODBC 3.51 to connect to MySQL.  Using 
> > ODBCDataAdapter to automagically manage the Insert and am capturing 
> > the RowUpdated Event (raised by the Adapter) so I can do the
> > "Last_insert_id()" command.
> >  
> > C# code as follows:
> >  
> > public void UpdateRow(){
> >     System.Data.Odbc.OdbcDataAdapter ladp;
> >     System.Data.Odbc.OdbcConnection lcn;
> >   
> >     lcn = this.GetConnection();
> >     ladp = new System.Data.Odbc.OdbcDataAdapter();
> >     //Wire the event listed below
> >     ladp.RowUpdated +=new
OdbcRowUpdatedEventHandler(ladp_RowUpdated);
> >     ladp.InsertCommand = new System.Data.Odbc.OdbcCommand();
> >     ladp.InsertCommand.CommandText = @"INSERT INTO tbl_individuals 
> > (vc_first_name, vc_last_name, id_user, id_created, id_updated,
> > id_active) VALUES (? , ? , 1, now(), now(), -1)";
> >      ladp.InsertCommand.Parameters.Add("@vc_first_name",
> > OdbcType.VarChar, 50, "vc_first_name");
> >     ladp.InsertCommand.Parameters.Add("@vc_last_name",
> > OdbcType.VarChar,
> > 50, "vc_last_name");
> >     ladp.InsertCommand.Connection = lcn;
> >     ladp.Update(ldts.Members);
> >     lcn.Close();
> >     ladp.Dispose();
> >     ladp = null;
> > }
> >  
> > private void ladp_RowUpdated(object sender,
> > OdbcRowUpdatedEventArgs e) {
> > 
> >  System.Data.Odbc.OdbcConnection lcn;
> >  int lintID = 0;
> >  if (e.StatementType==StatementType.Insert)
> >   {
> >   lcn = this.GetConnection();
> >   System.Data.Odbc.OdbcCommand lcmd = new OdbcCommand();
> >   try
> >   {
> >   lcmd.Connection = lcn;
> >   lcmd.CommandText = "SELECT LAST_INSERT_ID()";
> >   lintID = (string)lcmd.ExecuteScalar();
> >   }
> >   catch (System.Exception ex)
> >   {
> >   System.Diagnostics.Debug.WriteLine(ex.StackTrace);
> >   }
> >   e.Row["id"] = lintID;
> > }
> >  
> >  
> > Note:  as I write this, it occurs to me that maybe the issue
> > is with the
> > ODBCDataAdapter object.  I will test and see if it works using a
> > "standalone" ODBCCommand Object...
> >  
> > Thanks in advance for any help,
> >  
> > Raj
> > 
> > 
> > --
> > MySQL ODBC Mailing List
> > For list archives: http://lists.mysql.com/myodbc
> > To unsubscribe:    
> > http://lists.mysql.com/myodbc?> unsub=mhillyer@stripped
> > 
> > 
> 
> --
> MySQL ODBC Mailing List
> For list archives: http://lists.mysql.com/myodbc
> To unsubscribe:    http://lists.mysql.com/myodbc?unsub=1
> 
> 

-- 
Regards, Venu
For technical support contracts, go to https://order.mysql.com
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /   Mr. Venu <venu@stripped>
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, Developer
/_/  /_/\_, /___/\___\_\___/  Palo Alto, CA-94306
       <___/  www.mysql.com   USA
             

Thread
.Net, myodbc, & last_insert_id()Raj Muchhala18 Jun
  • 126 error code?Ed Kraft18 Jun
RE: .Net, myodbc, & last_insert_id()Mike Hillyer18 Jun
  • RE: .Net, myodbc, & last_insert_id()Scott Nichols18 Jun
RE: 126 error code?Mike Hillyer18 Jun
  • Re: 126 error code?Venu18 Jun
    • RE: 126 error code?Ed Kraft18 Jun
    • Re: 126 error code?Nils Valentin21 Jun
  • RE: 126 error code?Ed Kraft18 Jun
RE: .Net, myodbc, & last_insert_id()Mike Hillyer18 Jun
RE: 126 error code?Ed Kraft19 Jun
  • Re: 126 error code?Danny Haworth19 Jun
  • ADO generating 800a01fb Errors with MyODBC (ASP)Chris Gamache19 Jun
  • Re: 126 error code?Nils Valentin21 Jun
RE: .Net, myodbc, & last_insert_id()Raj Muchhala19 Jun