Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "KOL";
Текущий архив: 2012.02.26;
Скачать: [xml.tar.bz2];

Вниз

koledb   Найти похожие ветки 

 
boguslaw   (2009-05-13 19:58) [0]

Hello,

Do you know that koledb support transaction at least for MS Access provider ?
Simply by using "begin transaction","rollback" and "commit" as query text.

But I really wanted to ask how to retrieve last inserted value of primary key column of row.It was automatically generated by Access but I don"t know if simple select max(id) from table is good enough due to two programs working with the same database.

Any ideas ?

Boguslaw


 
boguslaw   (2009-05-13 20:53) [1]

I have found "select @@Identity" which should work as mentioned in MSDN returning last inserted id (value of autoincrement primary key) per connection
but it always returns zero for koledb with connection to jet 4.0 provider

Why ?

It should return zero only in case when  each TQuery executed in separate connection . Is that the way koldb TQuery.execute and open method work ?


 
boguslaw   (2009-05-13 21:11) [2]

OK.It maybe works but I"m using Access 97 database and it"s marked as unsupported. It might work for Access 2000 and uppser using jet 4.0 :-(


 
Dimaxx ©   (2009-05-19 00:46) [3]

У меня всегда в TDataSource.Destroy строка

if Initialized then CheckOLE(fIDBInitialize.UnInitialize);

выводит "OLE DB Error 80040E05". Даже пример в комплекте с KOLEdb по Free выдает тоже самое. Что при UnInitialize не то - не пойму.



Страницы: 1 вся ветка

Форум: "KOL";
Текущий архив: 2012.02.26;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.44 MB
Время: 0.004 c
2-1321257874
igorium
2011-11-14 12:04
2012.02.26
Загрузка в динамический Image часть изображения из файла


2-1320762578
я
2011-11-08 17:29
2012.02.26
Вывод сообщения на экран


15-1320758892
DVM
2011-11-08 16:28
2012.02.26
Помогите переписать функцию с ASM на Pascal или C


2-1321438146
Aleks
2011-11-16 14:09
2012.02.26
Автозагрузка проги в Windows XP sp3


2-1321475790
DnoProgrammer
2011-11-17 00:36
2012.02.26
свой Opendialog





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский