Re: Bug in SQLRowCount ?
От
Heikki Linnakangas
Тема
Re: Bug in SQLRowCount ?
Дата
Msg-id
50F82EC5.60701@vmware.com
Ответ на
Re: Bug in SQLRowCount ? (Johann Letzel)
Список
Дерево обсуждения
Bug in SQLRowCount ? "j.letzel@t-online.de" <j.letzel@t-online.de>
Re: Bug in SQLRowCount ? Hiroshi Inoue <inoue@tpf.co.jp>
Re: Bug in SQLRowCount ? Johann Letzel <j.letzel@t-online.de>
Re: Bug in SQLRowCount ? Heikki Linnakangas <hlinnakangas@vmware.com>
Re: Bug in SQLRowCount ? Johann Letzel <j.letzel@t-online.de>
Re: Bug in SQLRowCount ? Jaydip <jaydeep.thakkar92@gmail.com>
Re: Bug in SQLRowCount ? Clemens Ladisch <clemens@ladisch.de>
On 17.01.2013 16:05, Johann Letzel wrote: > But according to the ODBC API SQLRowCount should retrieve the number of affected rows by the statement. > > Why does PostgreSQL gives a 1 and MSSQL the number of inserted/updated rows ? According to this: http://msdn.microsoft.com/en-us/library/windows/desktop/ms711818%28v=vs.85%29.aspx, both behaviors are permitted. When the driver returns SQL_PARC_BATCH, when you call SQLGetInfo(conn, SQL_PARAM_ARRAY_ROW_COUNTS, ... ), the driver returns a separate row count for each parameter (PostgreSQL). When it returns SQL_PARC_NO_BATCH, it returns a single row count that's the sum of all parameters (MSSQL). In a portable application, you need to call SQLGetInfo, and deal with both behaviors. - Heikki
В списке pgsql-odbc по дате отправления