Re: Insert fails from VB only when table is empty...?

Поиск
Список
Период
Сортировка
От brew@theMode.com
Тема Re: Insert fails from VB only when table is empty...?
Дата
Msg-id Pine.BSF.4.44.0303281456150.66270-100000@themode.com
обсуждение исходный текст
Ответ на Insert fails from VB only when table is empty...?  ("LaBranche, Kevin" <klabranche@co.coconino.az.us>)
Список pgsql-novice
Kevin......

> I am brand new to pgsql... :-)  I have a VB program inserting records
> into a fairly simple table (without a PK) and I notice that when the
> table is empty I get a "row out of range" error.  This only happens when
> the table is empty.

I use PHP instead of VB, but it sounds like you should only try to fetch
the rows if some exist.  In php the first row fetch starts at zero, so if
there is one row you ask for n-1, i.e. row zero.  If no rows exist you use
an if statement to skip around the row fetch (and maybe print a no info
found message).

Maybe this is what's happening to you.

later....

brew

 ==========================================================================
                  Strange Brew   (brew@theMode.com)
     Check out my Musician's Online Database Exchange (The MODE Pages)
                        http://www.TheMode.com
 ==========================================================================


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

Предыдущее
От: "Chad Thompson"
Дата:
Сообщение: Re: Insert fails from VB only when table is empty...?
Следующее
От: Steve Crawford
Дата:
Сообщение: Re: Postgres Syslog