Showing entries 11 to 20 of 50
« 10 Newer Entries | 10 Older Entries »
Displaying posts with tag: .NET;MySQL;Technology (reset)
Retrieving autoincrement field values

Often people ask me how to retrieve the value of an autoincrement column when they are using the MySqlCommandBuilder object.  Generally this is done by appending something like ";SELECT last_insert_id()" onto the generated insert command text.  Command builder objects usually provide some type of syntax where a user can indicate that they want this to be done.  Connector/Net 1.0 had some syntax for this but starting with Connector/Net 5.0 that all changed. 

With the new ADO.Net 2.0 API, Microsoft did not directly provide for any type of API that users could use for selecting this.  With ADO.Net 2.0, there are two things that need to happen.  First, a SELECT statement similar to above must be attached to the INSERT command.  Second, the command object must have its UpdatedRowSource property set to Both or FirstReturnedRecord.  What this does is tell the data adapter update engine to take the …

[Read more]
Thanks Jeffrey!

We just finished up our 2007 Users Conference and I'd really like to thank David Sceppa and Jeffrey McManus for presenting at the conference.  David is a program manager on the ADO.Net team at Microsoft and I had more than one person come up to me and tell me that having a Microsoft rep at the sessions really indicated that we were serious about working with Microsoft tools and that Microsoft seemed very willing to help with that.  True indeed.

Also, I really appreciated Jeffrey being willing to jump in last minute and do a presentation for us.  He does alot of traveling and presenting so I know his time is precious.  Jeffrey also recently made available a tool he wrote for generating a set of classes for a given database schema.  He calls it Cgen and you can read his announcement about it here.  Keep up the good …

[Read more]
MiX sessions online

Didn't make MiX '07?  Neither did I.  That's ok, though, cause the sessions are all online here.  Alot of great content here.  I'm listening to a session talking about PHP on Windows.  Gotta get back....

The issue with FillSchema

Connector/Net's MySqlDataAdapter class has a method named FillSchema.  This method is intended to populate the metadata for a given query without actually returning any of the data from the query.  The only syntax that MySQL has to help with this is SQL_SELECT_LIMIT which limits the number of rows that are returned for a given select.  Indeed this is what we are using to prevent the transfer of data across the wire when we only want the metadata.

However, there is a problem.  SQL_SELECT_LIMIT does not work in stored procedures and also does not affect inserts, updates, or deletes.  So, the upshot of this is that calling FillSchema on a stored procedure will, in fact, execute the stored procedure and return all of the data to the client.  This is a waste of bandwidth but it's worse than that.  It will also execute all other DML statements in the procedure.

This is different than what happens with …

[Read more]
Using the new Connector/Net Web providers

Yesterday I blogged about the release of our latest Connector/Net product.  Version 5.1, this release includes the addition of a new namespace MySql.Web.  This namespace includes implementations of a Membership and Role provider.  These providers work together with the membership and role systems in ASP.Net 2.0 to provide a simple mechanism for web developers to add authentication and role support to their web properties.

As we were unable to include proper documentation for these new providers before release, I thought it proper to write down a few thoughts on how these work and how to use them.

1. Provide a connection string

The Connector/Net installer will register the providers in the proper sections of the machine.config file.  When registered, they reference a connection string that is non-existent.  To use the providers, you must provide a connection string that points …

[Read more]
Connector/Net 5.1.0 Alpha has been released.

Today we've announced the availability of Connector/Net 5.1.0 Alpha.  This is a very exciting release for us as it's the first time we've made available our ASP.Net 2.0 web providers and our compact framework support.  This release also folds in our Tools for Visual Studio into a single installer. 

To that end, we are dropping Tools for Visual Studio as as separate download.  Going forward, you can select Visual Studio integration as an option directly from the Connector/Net installer.  All the same functionality is there, but packaging the products in this way will simplify bug fixes to the products and give our users a better out of box experience.

We encourage anyone using our products to try out this latest release and let us know what you think.  You can read our official release announcement here.

Entity Framework cut. Positive sign?

Microsoft recently announced that they are removing the Entity Framework and tools from Visual Studio "Orcas" and will, instead, ship them as an update in the first half of 2008.  It's pretty easy to see this as YAMM (Yet Another Microsoft Miss) but I instead look at this as a very positive sign of things changing.

Microsoft is accelerating many of the development timelines and embracing the "release early, release often" methodology.  It seems that almost every Microsoft product these days comes out as a CTP about a million times even before it his beta stage.  This just means greater awareness and better adoption.  MS is even releasing alot more code as open source as they recently announced a Dynamic Language Runtime (DLR) that supports languages such as Python and Ruby.  They are releasing it under …

[Read more]
Visual Studio "Orcas" Beta 1 available

This is already making the blog rounds but the next pre-release version of the best development environment on the planet is out.  VPC images out and some ISO bits are available on MSDN.  Microsoft will also be making Express versions available in the next few days.  You can find all the links here.

Got tired of waiting...

Our next version of Connector/Net will include support for Compact Framework 2.0.  One thing that's been challenging is how to test our provider in this environment.  We have a NUnit test suite that we use with the normal provider but so far I haven't found any good way to run it under the compact framework.  I know about CFNUnitBridge but I needed something that could also work with compact framework 1.0.

So, I decided to write my own.  After two days of hacking I now have an application that does just what I want.  It loads my test suite and implements all the NUnit framework junk that I use.  I gave it a reasonable UI similar to what is seen in NUnit's GUI runner.  You can select a single test to run and have it run all the tests.  It also keeps track of exception messages and stack traces per test failure.  Here's a shot of …

[Read more]
MySQL Connector/Net 5.0.6 has been released.

MySQL Connector/Net 5.0.6 a new version of the all-managed .NET driver for MySQL has been released.
This is a bug fix release for the current production branch of Connector/Net.

 
Version 5.0.6 is suitable for use with any MySQL version including MySQL-4.1, MySQL-5.0, MySQL-5.1 beta or the MySQL-5.2 Falcon "Preview".
It is now available in source and binary form from the Connector/Net download pages at http://dev.mysql.com/downloads/connector/net/5.0.html and mirror sites (note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site.)

 
This release comes shortly after 5.0.5 due to an incompatibility with Tools for Visual Studio.  With 5.0.5, we changed how the connector respects binary data …

[Read more]
Showing entries 11 to 20 of 50
« 10 Newer Entries | 10 Older Entries »