Updated: 15/09/2002; 12:48:41 a.m..
Python Community Server (development progress)
A weblog about programming in Python, C#, Java, Perl and C++ - and the occasional comment on PyCS development

Thursday, 20 June 2002

It's taken quite a while, but I finally know how to get the row ID of a row I insert into an Jet (Access) database.  I'm used to MySQL, where SELECT LAST_INSERT_ID() returns the auto_increment value.  It looks like Jet will give you the same results if you SELECT @@IDENTITY.

Source: the 'experimentation' pages at adOpenStatic.com.  They figured it out from MS KB article Q232144, which announced this feature.

The process of finding information on software from Microsoft is new to me as I've used open-source tech (Apache, Perl, PHP, Python, MySQL, PostgreSQL) for pretty much all of my previous projects.  It's interesting to compare the amount / quality of documentation between MS and non-MS solutions.  In general I find that there is more documentation for the proprietary stuff, but I find it more difficult to find what I'm looking for, and often when I do find it, it's on a site like codeproject rather than in the official place.

It took me a few minutes to find last_insert_id() in the MySQL docs (when I'd only been using MySQL for a day or so), but I've been using System.Data for two weeks now and am only finding out important things like this now.

Can anybody point me at a better Windows data access reference?  It seems that MSDN isn't as helpful as I was hoping.

8:16:12 PM    comment []

© Copyright 2002 Phillip Pearson.
June 2002
Sun Mon Tue Wed Thu Fri Sat
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
May   Jul

[Macro error: Can't render navigator links because an error occurred: "The file "C:\Program Files\Radio UserLand\www\#navigatorLinks.xml" wasn't found.".]
Click here to visit the Radio UserLand website.

Subscribe to "Python Community Server (development progress)" in Radio UserLand.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.