wrong value returned?

Поиск
Список
Период
Сортировка
От
Тема wrong value returned?
Дата
Msg-id 6unltd$18tre9@toip37-bus.srvr.bell.ca
обсуждение исходный текст
Ответы Re: wrong value returned?
Список pgsql-odbc
Hi,

I've setup a query in my program to get the biggest value used in my "customers" table.  There is a serial column
calledcustomer_id.  I use the following query within my program and it returns, lets say, 3.  If I run the same query
fromthe psql console window (over and over and at the same point where I've stepped to in my program), it will
consistentlyreturn 2 whereas the program will consistently return 3 (always one more). 

Here is the query to get the last ID used:
SELECT customer_id from customers order by customer_id DESC limit 1;

I do one fetch and have my result programmatically which is always 1 more than the value returned by the psql console
windowmethod.  What gives? 

Many thanks,
Mike

В списке pgsql-odbc по дате отправления:

Предыдущее
От: "Richard Broersma"
Дата:
Сообщение: Re: [GENERAL] what gives: SELECT INVALID SELECT STATEMENT TO FORCE ODBC DRIVER TO UNPREPARED STATE
Следующее
От: "Fred Parkinson"
Дата:
Сообщение: Re: wrong value returned?