Обсуждение: Row Level out of range on 07.02.0005

Поиск
Список
Период
Сортировка

Row Level out of range on 07.02.0005

От
Muhammad Shariq Muzaffar
Дата:
hi
we are currently using pgsql 7.3.1 on Redhat linux
8.0, and we are developing interface using VB 6.0 on
windows 2000/XP.

We are having a problem using the latest psqlodbc i.e.
ver 07.02.0005. When ever we try to update a record
using '.update' command of the ADO recordset, ODBC
gives us an error of 'ROW VALUE OUT OF RANGE' but when
we use an older version of psqlodbc i.e. ver
07.01.0009, it runs smoothly.

We are using dynamic type of recordsets. Is it an
error, bug or do we have to install some other patch
or something.

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

Re: Row Level out of range on 07.02.0005

От
Chris Gamache
Дата:
I don't use rs.update simply because I find accessing the database with
conn.execute ("UPDATE table SET field=value;") yields more predictable results.
I'm also ONLY dealing with PostgreSQL, so I can optimize my SQL statements
specifically for PostgreSQL.

However, if I wanted to use rs.update I might try fiddling around with the
settings for "Use Declare/Fetch", and "UPDATABLE CURSORS". Couldn't hurt,
right?

CG

--- Muhammad Shariq Muzaffar <shariq77@yahoo.com> wrote:
> hi
> we are currently using pgsql 7.3.1 on Redhat linux
> 8.0, and we are developing interface using VB 6.0 on
> windows 2000/XP.
>
> We are having a problem using the latest psqlodbc i.e.
> ver 07.02.0005. When ever we try to update a record
> using '.update' command of the ADO recordset, ODBC
> gives us an error of 'ROW VALUE OUT OF RANGE' but when
> we use an older version of psqlodbc i.e. ver
> 07.01.0009, it runs smoothly.
>
> We are using dynamic type of recordsets. Is it an
> error, bug or do we have to install some other patch
> or something.
>
> __________________________________________________
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster


__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

Re: Row Level out of range on 07.02.0005

От
Muhammad Shariq Muzaffar
Дата:
Thanks a lot Chris, it really did the trick but now we
are having another problem. We are creating the DSN
through programming using SQLConfigDataSource function
using this code

Dim rc As Long
    ' 1=ODBC_ADD_DSN
    rc = SQLConfigDataSource(0, 1, "PostgreSQL", _
                             "DSN=someDSN" & Chr(0) &
_
                             "Servername=someServer" &
Chr(0) & _
                             "Username=someUser" &
Chr(0) & _
                             "Port=5432" & Chr(0) & _
                             "Protocol=6.4" & Chr(0) &
_
                             "ReadOnly=0" & Chr(0) & _
                             "UseDeclareFetch=1" &
Chr(0) & _
                             Chr(0))
    If rc = 0 Then
        MsgBox "Can't create data source"
    Else
        MsgBox "Data source created successfully"
    End If


But when ever i run this code, UseDeclareFetch doesnt
seem to work. This function is unable to set the value
of "Use Declare/Fetch" option of the DSN but if i use
RowVersioning option in above example, it runs
perfectly.



 --- Chris Gamache <cgg007@yahoo.com> wrote: > I don't
use rs.update simply because I find
> accessing the database with
> conn.execute ("UPDATE table SET field=value;")
> yields more predictable results.
> I'm also ONLY dealing with PostgreSQL, so I can
> optimize my SQL statements
> specifically for PostgreSQL.
>
> However, if I wanted to use rs.update I might try
> fiddling around with the
> settings for "Use Declare/Fetch", and "UPDATABLE
> CURSORS". Couldn't hurt,
> right?
>
> CG
>
> --- Muhammad Shariq Muzaffar <shariq77@yahoo.com>
> wrote:
> > hi
> > we are currently using pgsql 7.3.1 on Redhat linux
> > 8.0, and we are developing interface using VB 6.0
> on
> > windows 2000/XP.
> >
> > We are having a problem using the latest psqlodbc
> i.e.
> > ver 07.02.0005. When ever we try to update a
> record
> > using '.update' command of the ADO recordset, ODBC
> > gives us an error of 'ROW VALUE OUT OF RANGE' but
> when
> > we use an older version of psqlodbc i.e. ver
> > 07.01.0009, it runs smoothly.
> >
> > We are using dynamic type of recordsets. Is it an
> > error, bug or do we have to install some other
> patch
> > or something.
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Everything you'll ever need on one web page
> > from News and Sport to Email and Music Charts
> > http://uk.my.yahoo.com
> >
> > ---------------------------(end of
> broadcast)---------------------------
> > TIP 4: Don't 'kill -9' the postmaster
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Tax Center - forms, calculators, tips, more
> http://taxes.yahoo.com/
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

Re: Row Level out of range on 07.02.0005

От
Chris Gamache
Дата:
Why not use a DSN-Less connection ? It will save you a round-trip to ODBC to
find out DSN settings...

Here's a link on a nifty way to create DSN-Less connection strings... I use it
ALL the time:

http://www.4guysfromrolla.com/webtech/070699-1.shtml

You can specify whatever options you need, and be certain they will be there.
Plus, you won't have to create a system/user/file DSN on your client computer.
Everything will be controlled from within the program.

Use it like this

connstr = "[your connection string here]"
set conn = createobject("adodb.connection")
conn.open connstr

...

CG

--- Muhammad Shariq Muzaffar <shariq77@yahoo.com> wrote:
> Thanks a lot Chris, it really did the trick but now we
> are having another problem. We are creating the DSN
> through programming using SQLConfigDataSource function
> using this code
>
> Dim rc As Long
>     ' 1=ODBC_ADD_DSN
>     rc = SQLConfigDataSource(0, 1, "PostgreSQL", _
>                              "DSN=someDSN" & Chr(0) &
> _
>                              "Servername=someServer" &
> Chr(0) & _
>                              "Username=someUser" &
> Chr(0) & _
>                              "Port=5432" & Chr(0) & _
>                              "Protocol=6.4" & Chr(0) &
> _
>                              "ReadOnly=0" & Chr(0) & _
>                              "UseDeclareFetch=1" &
> Chr(0) & _
>                              Chr(0))
>     If rc = 0 Then
>         MsgBox "Can't create data source"
>     Else
>         MsgBox "Data source created successfully"
>     End If
>
>
> But when ever i run this code, UseDeclareFetch doesnt
> seem to work. This function is unable to set the value
> of "Use Declare/Fetch" option of the DSN but if i use
> RowVersioning option in above example, it runs
> perfectly.
>
>
>
>  --- Chris Gamache <cgg007@yahoo.com> wrote: > I don't
> use rs.update simply because I find
> > accessing the database with
> > conn.execute ("UPDATE table SET field=value;")
> > yields more predictable results.
> > I'm also ONLY dealing with PostgreSQL, so I can
> > optimize my SQL statements
> > specifically for PostgreSQL.
> >
> > However, if I wanted to use rs.update I might try
> > fiddling around with the
> > settings for "Use Declare/Fetch", and "UPDATABLE
> > CURSORS". Couldn't hurt,
> > right?
> >
> > CG
> >
> > --- Muhammad Shariq Muzaffar <shariq77@yahoo.com>
> > wrote:
> > > hi
> > > we are currently using pgsql 7.3.1 on Redhat linux
> > > 8.0, and we are developing interface using VB 6.0
> > on
> > > windows 2000/XP.
> > >
> > > We are having a problem using the latest psqlodbc
> > i.e.
> > > ver 07.02.0005. When ever we try to update a
> > record
> > > using '.update' command of the ADO recordset, ODBC
> > > gives us an error of 'ROW VALUE OUT OF RANGE' but
> > when
> > > we use an older version of psqlodbc i.e. ver
> > > 07.01.0009, it runs smoothly.
> > >
> > > We are using dynamic type of recordsets. Is it an
> > > error, bug or do we have to install some other
> > patch
> > > or something.
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Everything you'll ever need on one web page
> > > from News and Sport to Email and Music Charts
> > > http://uk.my.yahoo.com
> > >
> > > ---------------------------(end of
> > broadcast)---------------------------
> > > TIP 4: Don't 'kill -9' the postmaster
> >
> >
> > __________________________________________________
> > Do you Yahoo!?
> > Yahoo! Tax Center - forms, calculators, tips, more
> > http://taxes.yahoo.com/
> >
> > ---------------------------(end of
> > broadcast)---------------------------



__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

Re: Row Level out of range on 07.02.0005

От
Chris Gamache
Дата:
Oh! I forgot to mention, if the "Microsoft Data Link option" is not available
on your context menu, choose "Notepad", and then rename the file to
"whatever.udl". That will associate it with the Data Link application.

CG

--- Muhammad Shariq Muzaffar <shariq77@yahoo.com> wrote:
> Thanks a lot Chris, it really did the trick but now we
> are having another problem. We are creating the DSN
> through programming using SQLConfigDataSource function
> using this code
>
> Dim rc As Long
>     ' 1=ODBC_ADD_DSN
>     rc = SQLConfigDataSource(0, 1, "PostgreSQL", _
>                              "DSN=someDSN" & Chr(0) &
> _
>                              "Servername=someServer" &
> Chr(0) & _
>                              "Username=someUser" &
> Chr(0) & _
>                              "Port=5432" & Chr(0) & _
>                              "Protocol=6.4" & Chr(0) &
> _
>                              "ReadOnly=0" & Chr(0) & _
>                              "UseDeclareFetch=1" &
> Chr(0) & _
>                              Chr(0))
>     If rc = 0 Then
>         MsgBox "Can't create data source"
>     Else
>         MsgBox "Data source created successfully"
>     End If
>
>
> But when ever i run this code, UseDeclareFetch doesnt
> seem to work. This function is unable to set the value
> of "Use Declare/Fetch" option of the DSN but if i use
> RowVersioning option in above example, it runs
> perfectly.
>
>
>
>  --- Chris Gamache <cgg007@yahoo.com> wrote: > I don't
> use rs.update simply because I find
> > accessing the database with
> > conn.execute ("UPDATE table SET field=value;")
> > yields more predictable results.
> > I'm also ONLY dealing with PostgreSQL, so I can
> > optimize my SQL statements
> > specifically for PostgreSQL.
> >
> > However, if I wanted to use rs.update I might try
> > fiddling around with the
> > settings for "Use Declare/Fetch", and "UPDATABLE
> > CURSORS". Couldn't hurt,
> > right?
> >
> > CG
> >
> > --- Muhammad Shariq Muzaffar <shariq77@yahoo.com>
> > wrote:
> > > hi
> > > we are currently using pgsql 7.3.1 on Redhat linux
> > > 8.0, and we are developing interface using VB 6.0
> > on
> > > windows 2000/XP.
> > >
> > > We are having a problem using the latest psqlodbc
> > i.e.
> > > ver 07.02.0005. When ever we try to update a
> > record
> > > using '.update' command of the ADO recordset, ODBC
> > > gives us an error of 'ROW VALUE OUT OF RANGE' but
> > when
> > > we use an older version of psqlodbc i.e. ver
> > > 07.01.0009, it runs smoothly.
> > >
> > > We are using dynamic type of recordsets. Is it an
> > > error, bug or do we have to install some other
> > patch
> > > or something.
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Everything you'll ever need on one web page
> > > from News and Sport to Email and Music Charts
> > > http://uk.my.yahoo.com
> > >
> > > ---------------------------(end of
> > broadcast)---------------------------
> > > TIP 4: Don't 'kill -9' the postmaster
> >
> >
> > __________________________________________________
> > Do you Yahoo!?
> > Yahoo! Tax Center - forms, calculators, tips, more
> > http://taxes.yahoo.com/
> >
> > ---------------------------(end of
> > broadcast)---------------------------
> > TIP 5: Have you checked our extensive FAQ?
> >
> > http://www.postgresql.org/users-lounge/docs/faq.html
>
> __________________________________________________
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster


__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/