|
|
Sponsor |
Re: New driver snapshot - 07.03.0209: msg#00104db.postgresql.odbc
> -----Original Message----- > From: Philippe Lang [mailto:philippe.lang@xxxxxxxxxxxxxx] > Sent: 19 April 2004 08:57 > To: Dave Page > Subject: RE: [ODBC] New driver snapshot - 07.03.0209 > > Hello, > > After a quick test, I would say the driver works fine, > thanks. I use a LATIN1 encoded database, though. Thanks for the feedback. > Regarding the issue we have been talking about in this > newsgroup, the "SELECT @@IDENTITY" problem, is there a way of > incorporing that in the driver itself? Your mention in your > last message: > > > Standard answer: The best method would be to do a "SELECT > currval('seq_name');" > > when required on the relevant sequence. > > Are you talking about a sequence in the driver? Could you > point me to the place where you beleive changes could be > made? I could make a few tests here, but I have to say I > absolutely don't know where to start, nor if it's possible to > fix the driver... It's more of an app-level thing. There are various problems to consider: - The sequence must be identified - that means executing a query to look at the schema and figure out what sequence is generating the ID (if any). - What if the pkey is multi-part? - What if you ignore pkeys, and look for columns with a default of nextval(something or other) - what if there are 2? Which one should you return? - How do you identify an insert in the driver? Do you need to parse *every* statement, or will this only work for cursors (which I never use and cannot help much with). Doing this properly requires changes to the fe/be protocol imho. If the CommandComplete message could be changed to return the pkey values for any affected rows, that would be ideal at first thought (though anything more than a couple of records should probably have a dedicated query message to prevent unnecessary data transfers). 2 problems there though - firstly, Tom just changed the fe/be protocol for 7.4 and I seriously doubt he (or any of the other hackers) would want it to change again, and secondly, the driver doesn't even support the 7.4 protocol yet (though Hiroshi did mention he had a patch once), never mind a future version. I think this is a non-starter :-( Regards, Dave. ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@xxxxxxxxxxxxxx
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: New driver snapshot - 07.03.0209, Dave Page |
|---|---|
| Next by Date: | "Use Declare/Fetch" option, David P. Lurie |
| Previous by Thread: | Re: New driver snapshot - 07.03.0209, Dave Page |
| Next by Thread: | "Use Declare/Fetch" option, David P. Lurie |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |
Home | sitemap
| advertise | OSDir is
an inevitable website.
|