10 messages in com.mysql.lists.dotnetRE: Installer
FromSent OnAttachments
Ville Mattila17 Nov 2004 05:05 
Barry Zubel17 Nov 2004 09:29 
Jordan Sparks17 Nov 2004 10:01 
Joshua Mouch17 Nov 2004 10:17 
Lance Johnson17 Nov 2004 10:31 
Reggie Burnett17 Nov 2004 10:32 
Luke Venediger17 Nov 2004 19:31 
Luke Venediger17 Nov 2004 19:32 
Reggie Burnett17 Nov 2004 20:43 
James Moore17 Nov 2004 20:54 
Subject:RE: Installer
From:Reggie Burnett (reg@mysql.com)
Date:11/17/2004 10:32:14 AM
List:com.mysql.lists.dotnet

The installer is trying to make the registry entry for vs.net 7.0 and 7.1 so the assembly appears in the Add Reference dialog box, however I think it's not working for this rev. I'll clean it up for GA.

I'm still debating whether to stuff it into the GAC. I may make it an installer option.

-reggie

-----Original Message----- From: Lance Johnson [mailto:ljoh@DOCS.com] Sent: Wednesday, November 17, 2004 12:32 PM To: dot@lists.mysql.com Subject: RE: Installer

VS.Net doesn't actually add the GAC assemblies into the references area. Instead if there's a directory you want added you have to make an edit in your registry. You can go to the following sites that show some good info on this:

http://www.syncfusion.com/FAQ/WinForms/FAQ_c62c.asp#q1014q http://www.eggheadcafe.com/PrintSearchContent.asp?LINKID=591

Hope that helps.

-----Original Message----- From: Joshua Mouch [mailto:jos@emailscout.net] Sent: Wednesday, November 17, 2004 12:18 PM To: dot@lists.mysql.com Subject: Installer

It'd be nice if the installer put the connector into the GAC automatically. Every release seems to install to a different directory, and I have to go through all my projects to change the reference paths. :P

Which brings me to a question... I copied the mysql connector dll to the assembly directory under Windows. When I look in the GAC directory, I see the Mysql.Data.dll file there, but for some reason, it doesn't show up when adding a reference to a project from within Visual Studio. All of the other GAC assemblies are there, but not Mysql.Data.dll. Anybody else experienced this, or is my machine just messed up? :-)

-----Original Message----- From: Jordan Sparks [mailto:jspa@free-dental.com] Sent: Wednesday, November 17, 2004 1:02 PM To: dot@lists.mysql.com Subject: RE: Last insert autoincrement id value with VB.NET

I don't know of one. But remember that you can simply build a function to encapsulate that behavior. For instance, I have:

public int NonQ(string command){ return NonQ(command,false); }

public int NonQ(string command,bool getInsertID){ cmd.CommandText=command; int rowsChanged=0; try{ con.Open(); rowsChanged=cmd.ExecuteNonQuery(); if(getInsertID){ cmd.CommandText="SELECT LAST_INSERT_ID()";

dr=(MySqlDataReader)cmd.ExecuteReader(); if(dr.Read())

InsertID=PIn.PInt(dr[0].ToString()); } } catch(MySqlException e){ MessageBox.Show("Error: "+e.Message+","+cmd.CommandText); } //catch{ // MessageBox.Show("Error: "+); //} finally{ con.Close(); } return rowsChanged; }

I know it's C#, but you should be able to follow it. Basically, the second function does all the work, but is overloaded in the first function. So, throughout my code, I can either call DataConnection.NonQ("some string"), or I can call DataConnection.NonQ("some string",true). Then DataConnection.InsertID will contain the last increment id. I'm sure my function above could be a little more elegant, but it get's the job done.

-----Original Message----- From: Ville Mattila [mailto:vil@pmd.fi] Sent: Wednesday, November 17, 2004 5:06 AM To: dot@lists.mysql.com Subject: Last insert autoincrement id value with VB.NET

Hello,

I was wondering if there is a function on Connector/.NET to receive easily the value of the auto increment id from the latest inserted row. Or is the only possibility to execute another query (SELECT LAST_INSERT_ID()) ?

Thanks, Ville