pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
postgresODBC and Symantec dbAnywhere/Visual Cafe, broken?
7+ messages / 2 participants
[nested] [flat]

* postgresODBC and Symantec dbAnywhere/Visual Cafe, broken?
@ 1998-08-05 17:16  Matthew Hagerty <matthew@wolfepub.com>
  0 siblings, 2 replies; 7+ messages in thread

From: Matthew Hagerty @ 1998-08-05 17:16 UTC (permalink / raw)
  To: pgsql-interfaces

Greetings,

I'm going to get all these interfaces working if it kills me! ;)

I have dbAnywhere running, I have an ODBC driver for my database
(PostgreSQL) installed and working, and dbAnywhere makes a connection okay.
 The only problem I have is when I try to select a table using a wizard (or
in the recordDefinition->Table Name property, or in the dbNavigator), I get
the following error:

dbAnywhere window:

    Message: [Symantec][dbANYWHERE Server][Version: 1.1a - Build:
219][SQL]Database engine or client library specific error encountered.
    DBMS error code: 1
    DBMS message: Null statement result in SQLFetch.
    Suggestion: Please see the specific database's vendor supplied
manual(s) for further information concerning this error.


From my ODBC log:

STATEMENT ERROR: func=SQLFetch, desc='', errnum=3, errmsg='Null statement
result in SQLFetch.'
                 ------------------------------------------------------------
                 hdbc=75499644, stmt=75514136, result=0
                 manual_result=1, prepare=0, internal=0
                 bindings=0, bindings_allocated=0
                 parameters=0, parameters_allocated=0
                 statement_type=-2, statement='(null)'
                 stmt_with_params=''
                 data_at_exec=-1, current_exec_param=-1, put_data=0
                 currTuple=-1, current_col=-1, lobj_fd=-1
                 maxRows=0, rowset_size=1, keyset_size=0, cursor_type=0,
scroll_concurrency=1
                 cursor_name=''
                 ----------------QResult Info -------------------------------
CONN ERROR: func=SQLFetch, desc='', errnum=0, errmsg=''
            ------------------------------------------------------------
            henv=76546180, conn=75499644, status=1, num_stmts=16
            sock=76546196, stmts=76546236, lobj_type=-999
            ---------------- Socket Info -------------------------------
            socket=40, reverse=0, errornumber=0, errormsg='(null)'
            buffer_in=75505936, buffer_out=75510036
            buffer_filled_in=2, buffer_filled_out=0, buffer_read_in=2


Does anyone have any ideas what may be causing this error?  I have tried
changing the ODBC setting to just about everything that makes sense (and
them some that don't).  The only problems with the driver seems to be
viewing tables.

Otherwise, I *am* able to create tables using postgresqlODBC via
dbAnywhere!  Go figure that I can create a table with dbAnywhere via ODBC,
but I can't view a table!?

Any ideas?

Thanks,
Matthew




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: [INTERFACES] postgresODBC and Symantec dbAnywhere/Visual Cafe, broken?
@ 1998-08-05 18:25  David Hartwig <daveh@insightdist.com>
  parent: Matthew Hagerty <matthew@wolfepub.com>
  1 sibling, 0 replies; 7+ messages in thread

From: David Hartwig @ 1998-08-05 18:25 UTC (permalink / raw)
  To: Matthew Hagerty <matthew@wolfepub.com>; +Cc: pgsql-interfaces

1.   What version of the driver?

2.  Could you activate the CommLog in the drive setup and send the result of a
minimal test.  The log file will be found in C:\psqlodbc.log .

Matthew Hagerty wrote:

> Greetings,
>
> I'm going to get all these interfaces working if it kills me! ;)
>
> I have dbAnywhere running, I have an ODBC driver for my database
> (PostgreSQL) installed and working, and dbAnywhere makes a connection okay.
>  The only problem I have is when I try to select a table using a wizard (or
> in the recordDefinition->Table Name property, or in the dbNavigator), I get
> the following error:
>
> dbAnywhere window:
>
>     Message: [Symantec][dbANYWHERE Server][Version: 1.1a - Build:
> 219][SQL]Database engine or client library specific error encountered.
>     DBMS error code: 1
>     DBMS message: Null statement result in SQLFetch.
>     Suggestion: Please see the specific database's vendor supplied
> manual(s) for further information concerning this error.
>
> >From my ODBC log:
>
> STATEMENT ERROR: func=SQLFetch, desc='', errnum=3, errmsg='Null statement
> result in SQLFetch.'
>                  ------------------------------------------------------------
>                  hdbc=75499644, stmt=75514136, result=0
>                  manual_result=1, prepare=0, internal=0
>                  bindings=0, bindings_allocated=0
>                  parameters=0, parameters_allocated=0
>                  statement_type=-2, statement='(null)'
>                  stmt_with_params=''
>                  data_at_exec=-1, current_exec_param=-1, put_data=0
>                  currTuple=-1, current_col=-1, lobj_fd=-1
>                  maxRows=0, rowset_size=1, keyset_size=0, cursor_type=0,
> scroll_concurrency=1
>                  cursor_name=''
>                  ----------------QResult Info -------------------------------
> CONN ERROR: func=SQLFetch, desc='', errnum=0, errmsg=''
>             ------------------------------------------------------------
>             henv=76546180, conn=75499644, status=1, num_stmts=16
>             sock=76546196, stmts=76546236, lobj_type=-999
>             ---------------- Socket Info -------------------------------
>             socket=40, reverse=0, errornumber=0, errormsg='(null)'
>             buffer_in=75505936, buffer_out=75510036
>             buffer_filled_in=2, buffer_filled_out=0, buffer_read_in=2
>
> Does anyone have any ideas what may be causing this error?  I have tried
> changing the ODBC setting to just about everything that makes sense (and
> them some that don't).  The only problems with the driver seems to be
> viewing tables.
>
> Otherwise, I *am* able to create tables using postgresqlODBC via
> dbAnywhere!  Go figure that I can create a table with dbAnywhere via ODBC,
> but I can't view a table!?
>
> Any ideas?
>
> Thanks,
> Matthew






^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: [INTERFACES] postgresODBC and Symantec dbAnywhere/Visual Cafe, broken?
@ 1998-08-06 01:29  Matthew Hagerty <matthew@wolfepub.com>
  parent: Matthew Hagerty <matthew@wolfepub.com>
  1 sibling, 1 reply; 7+ messages in thread

From: Matthew Hagerty @ 1998-08-06 01:29 UTC (permalink / raw)
  To: David Hartwig <daveh@insightdist.com>; +Cc: pgsql-interfaces

David,


I knew I forgot something in my post, the version info is as follows:


Server:

  FreeBSD-2.2.7-Release

  PostgreSQL-6.3.2


Client:

  Win95-osr2

  ODBC-6.30.0248 from www.insightdist.com (the latest according to the
web page)

  <bigger>Symantec dbANYWHERE Server 1.1a for Windows 95/NT (Evaluation
Version)</bigger> 

  <bigger>Symantec </bigger>Visual Cafe for Java, Database Developers
Edition 2.5 (Evaluation Version, hey I'm not paying for any of this stuff
until I know it is going to work ;)


The log samples I included before where from the c:\psqlodbc.log file,
but I have included a full log of the following simple test.  I have also
included a log that dbAnywhere generates.


First a quick rundown of what dbAnywhere does.  dbAnywhere is a
middle-man data source.  You are supposed to configure dbAnywhere to
communicate with all your datasources, then Visual Cafe only has to know
how to communicate with dbAnywhere.  It makes working with Visual Cafe
really nice, but dbAnywhere only runs on Windoz, so you have to have a
95/NT server set up in addition to your UN*X PostgreSQL.


Since I am developing on Win95 using Visual Cafe, I can run dbAnywhere on
the same machine and use all the nice features that running dbAnywhere
provides to Visual Cafe, i.e. drag-and-drop master-detail, simple form
generation, etc.  Then when my applet is done, I simply switch the
applet's datadriver to use the jdbc:postgresql driver and cut dbAnywhere
out of the picture.  I have gotten the jdbc:postgresql part working, now
if I could just get the ODBC part going...


On to the test.


0. Cleared the log files.  (can you tell I'm a programmer?)

1. I turned on logging for the postgresODBC driver.

2. I fired up dbAnywhere and enabled its logging.

3. I fired up Visual Cafe.

4. In Visual Cafe I selected view->dbNavigator

5. In the dbNavigator window I clicked on the "plus" in front of
"evaluation" (the name of the dbAnywhere server running on the localhost
Win95 machine.)

    Navigation using dbNavigator is just like Windoz Explorer.

    All the possible datasources were displayed and PostgreSQL was one of
them.

6. I clicked on the "plus" in front of "PostgreSQL".

    I was then prompted for a username and password.

7. I typed in a username and password I have set up on my posgresql
server.

    All tables owned by the user I typed in were then displayed.  The
database to connect to is set in the ODBC configuration.  This particular
database is called "test" and has two tables, contacts and persons.

8. I clicked on the "plus" in front of the "contacts" table name.

    This is when I get the error: DBMS message: Null statement result in
SQLFetch.


That's it.  I closed all the programs and saved the logs (included
below).  This error occurs anytime I try to view a table's fields via
dbAnywhere.  Kind of makes it useless.


Any ideas?


Thanks,

Matthew



psqlodbc.log

------------

DSN info:
DSN='PostgreSQL',server='10.0.0.1',port='5432',dbase='test',user='postgres',passwd='postgres1'

         
readonly='0',protocol='',showoid='1',fakeoidindex='0',showsystable='0'

          conn_settings=''

          translation_dll='',translation_option=''

conn = 87033980, SQLConnect(DSN='PostgreSQL', UID='postgres',
PWD='postgres1')

Global Options: fetch=100, socket=4096, unknown_sizes=2,
max_varchar_size=254, max_longvarchar_size=4094

                disable_optimizer=1, unique_index=0, use_declarefetch=1

                text_as_longvarchar=0, unknowns_as_longvarchar=0,
bools_as_char=1

                extra_systable_prefixes='dd_;', conn_settings=''

conn=87033980, query=' '

conn=87033980, query='BEGIN'

conn=87033980, query='set DateStyle to 'ISO'; set geqo to 'OFF''

Command response: 'SET VARIABLE'

conn=87033980, query='declare SQL_CUR87048472 cursor for select oid from
pg_type where typname='lo''

conn=87033980, query='fetch 100 in SQL_CUR87048472'

    [ fetched 0 rows ]

conn=87033980, query='close SQL_CUR87048472'

conn=87033980, query='END'

conn=87033980, query='BEGIN'

conn=87033980, query='declare SQL_CUR87114156 cursor for select relname,
usename, relhasrules from pg_class, pg_user where relkind = 'r'  and
usename like 'postgres' and relname !~ '^pg_|^dd_' and relname !~
'^xinv[0-9]+' and int4out(usesysid) = int4out(relowner) order by
relname'

conn=87033980, query='fetch 100 in SQL_CUR87114156'

    [ fetched 2 rows ]

conn=87033980, query='close SQL_CUR87114156'

conn=87033980, query='END'

conn=87033980, query='BEGIN'

conn=87033980, query='declare SQL_CUR87114156 cursor for select
u.usename, c.relname, a.attname, a.atttypid,t.typname, a.attnum,
a.attlen, a.atttypmod, a.attnotnull from pg_user u, pg_class c,
pg_attribute a, pg_type t where int4out(u.usesysid) = int4out(c.relowner)
and c.oid= a.attrelid and a.atttypid = t.oid and (a.attnum > 0) and
c.relname like 'contacts' order by attnum'

conn=87033980, query='fetch 100 in SQL_CUR87114156'

    [ fetched 10 rows ]

conn=87033980, query='close SQL_CUR87114156'

conn=87033980, query='END'

conn=87033980, query='BEGIN'

conn=87033980, query='declare SQL_CUR87193300 cursor for select
u.usename, c.relname, a.attname, a.atttypid,t.typname, a.attnum,
a.attlen, a.atttypmod, a.attnotnull from pg_user u, pg_class c,
pg_attribute a, pg_type t where int4out(u.usesysid) = int4out(c.relowner)
and c.oid= a.attrelid and a.atttypid = t.oid and (a.attnum > 0) and
c.relname like 'contacts' order by attnum'

conn=87033980, query='fetch 100 in SQL_CUR87193300'

    [ fetched 10 rows ]

conn=87033980, query='close SQL_CUR87193300'

conn=87033980, query='END'

conn=87033980, query='BEGIN'

conn=87033980, query='declare SQL_CUR87114156 cursor for select
c.relname, i.indkey, i.indisunique, i.indisclustered from pg_index i,
pg_class c, pg_class d where c.oid = i.indexrelid and d.relname =
'contacts' and d.oid = i.indrelid'

conn=87033980, query='fetch 100 in SQL_CUR87114156'

    [ fetched 0 rows ]

conn=87033980, query='close SQL_CUR87114156'

conn=87033980, query='END'

conn=87033980, query='BEGIN'

conn=87033980, query='declare SQL_CUR87048472 cursor for select distinct
on attnum a2.attname, a2.attnum from pg_attribute a1, pg_attribute a2,
pg_class c, pg_index i where c.relname = 'contacts_pkey' AND c.oid =
i.indexrelid AND a1.attrelid = c.oid AND a2.attrelid = c.oid AND
(i.indkey[0] = a1.attnum OR i.indkey[1] = a1.attnum OR i.indkey[2] =
a1.attnum OR i.indkey[3] = a1.attnum OR i.indkey[4] = a1.attnum OR
i.indkey[5] = a1.attnum OR i.indkey[6] = a1.attnum OR i.indkey[7] =
a1.attnum) order by a2.attnum'

conn=87033980, query='fetch 100 in SQL_CUR87048472'

    [ fetched 0 rows ]

conn=87033980, query='close SQL_CUR87048472'

conn=87033980, query='END'

STATEMENT ERROR: func=SQLFetch, desc='', errnum=3, errmsg='Null statement
result in SQLFetch.'

                
------------------------------------------------------------

                 hdbc=87033980, stmt=87193300, result=0

                 manual_result=1, prepare=0, internal=0

                 bindings=0, bindings_allocated=0

                 parameters=0, parameters_allocated=0

                 statement_type=-2, statement='(null)'

                 stmt_with_params=''

                 data_at_exec=-1, current_exec_param=-1, put_data=0

                 currTuple=-1, current_col=-1, lobj_fd=-1

                 maxRows=0, rowset_size=1, keyset_size=0, cursor_type=0,
scroll_concurrency=1

                 cursor_name=''

                 ----------------QResult Info
-------------------------------

CONN ERROR: func=SQLFetch, desc='', errnum=0, errmsg=''

            
------------------------------------------------------------

            henv=88080516, conn=87033980, status=1, num_stmts=16

            sock=88080532, stmts=88080572, lobj_type=-999

            ---------------- Socket Info 
-------------------------------

            socket=44, reverse=0, errornumber=0, errormsg='(null)'

            buffer_in=87040272, buffer_out=87044372

            buffer_filled_in=2, buffer_filled_out=0, buffer_read_in=2

conn=87033980, SQLDisconnect



dbAnywhere.log

--------------

902364484 Logging onto the server 'PostgreSQL'

902364484 Opening the database 'PostgreSQL' ...

902364485 DATA SOURCE NAME: PostgreSQL

DBMS NAME: PostgreSQL

DBMS VERSION 06.30.0248 PostgreSQL 6.3

ODBC DRIVER NAME: PSQLODBC.DLL

ODBC DRIVER VERSION: 06.30.0248

SUPPORTED: Yes

902364497 Null statement result in SQLFetch.

902364497 Error: SQL9999

    Message: [Symantec][dbANYWHERE Server][Version: 1.1a - Build:
219][SQL]Database engine or client library specific error encountered.

    DBMS error code: 1

    DBMS message: Null statement result in SQLFetch.

    Suggestion: Please see the specific database's vendor supplied
manual(s) for further information concerning this error.

902364497 Error: SQL9999

    Message: [Symantec][dbANYWHERE Server][Version: 1.1a - Build:
219][SQL]Database engine or client library specific error encountered.

    DBMS error code: 1

    DBMS message: Null statement result in SQLFetch.

    Suggestion: Please see the specific database's vendor supplied
manual(s) for further information concerning this error.

902364508 DC,127.0.0.1,902364464,44,15




>1.   What version of the driver?

>

>2.  Could you activate the CommLog in the drive setup and send the
result of a

>minimal test.  The log file will be found in C:\psqlodbc.log .

>

>Matthew Hagerty wrote:

>

>> Greetings,

>>

>> I'm going to get all these interfaces working if it kills me! ;)

>>

>> I have dbAnywhere running, I have an ODBC driver for my database

>> (PostgreSQL) installed and working, and dbAnywhere makes a connection
okay.

>>  The only problem I have is when I try to select a table using a
wizard (or

>> in the recordDefinition->Table Name property, or in the dbNavigator),
I get

>> the following error:

>>

>> dbAnywhere window:

>>

>>     Message: [Symantec][dbANYWHERE Server][Version: 1.1a - Build:

>> 219][SQL]Database engine or client library specific error
encountered.

>>     DBMS error code: 1

>>     DBMS message: Null statement result in SQLFetch.

>>     Suggestion: Please see the specific database's vendor supplied

>> manual(s) for further information concerning this error.

>>

>> >From my ODBC log:

>>

>> STATEMENT ERROR: func=SQLFetch, desc='', errnum=3, errmsg='Null
statement

>> result in SQLFetch.'

>>                 
------------------------------------------------------------

>>                  hdbc=75499644, stmt=75514136, result=0

>>                  manual_result=1, prepare=0, internal=0

>>                  bindings=0, bindings_allocated=0

>>                  parameters=0, parameters_allocated=0

>>                  statement_type=-2, statement='(null)'

>>                  stmt_with_params=''

>>                  data_at_exec=-1, current_exec_param=-1, put_data=0

>>                  currTuple=-1, current_col=-1, lobj_fd=-1

>>                  maxRows=0, rowset_size=1, keyset_size=0,
cursor_type=0,

>> scroll_concurrency=1

>>                  cursor_name=''

>>                  ----------------QResult Info
-------------------------------

>> CONN ERROR: func=SQLFetch, desc='', errnum=0, errmsg=''

>>            
------------------------------------------------------------

>>             henv=76546180, conn=75499644, status=1, num_stmts=16

>>             sock=76546196, stmts=76546236, lobj_type=-999

>>             ---------------- Socket Info
-------------------------------

>>             socket=40, reverse=0, errornumber=0, errormsg='(null)'

>>             buffer_in=75505936, buffer_out=75510036

>>             buffer_filled_in=2, buffer_filled_out=0, 
buffer_read_in=2

>>

>> Does anyone have any ideas what may be causing this error?  I have
tried

>> changing the ODBC setting to just about everything that makes sense
(and

>> them some that don't).  The only problems with the driver seems to 
be

>> viewing tables.

>>

>> Otherwise, I *am* able to create tables using postgresqlODBC via

>> dbAnywhere!  Go figure that I can create a table with dbAnywhere via
ODBC,

>> but I can't view a table!?

>>

>> Any ideas?

>>

>> Thanks,

>> Matthew

>

>

>

>



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: [INTERFACES] postgresODBC and Symantec dbAnywhere/Visual Cafe, broken?
@ 1998-08-06 18:44  David Hartwig <daveh@insightdist.com>
  parent: Matthew Hagerty <matthew@wolfepub.com>
  0 siblings, 0 replies; 7+ messages in thread

From: David Hartwig @ 1998-08-06 18:44 UTC (permalink / raw)
  To: Matthew Hagerty <matthew@wolfepub.com>; +Cc: pgsql-interfaces

Mathew,

I will do my best to sort through this.    Byron, the primary author of the driver will be returning from vacation,  Monday.  I expect he may not get to this until at least the middle of next week.  In any case, we do not have dbanywhere here and I am not aware of anyone using the driver for this.   But we will get it resolved.

Matthew Hagerty wrote:

> psqlodbc.log
> ------------
> DSN info: DSN='PostgreSQL',server='10.0.0.1',port='5432',dbase='test',user='postgres',passwd='postgres1'
>
> readonly='0',protocol='',showoid='1',fakeoidindex='0',showsystable='0'
> conn_settings=''
> translation_dll='',translation_option=''
> conn = 87033980, SQLConnect(DSN='PostgreSQL', UID='postgres', PWD='postgres1')
> Global Options: fetch=100, socket=4096, unknown_sizes=2, max_varchar_size=254, max_longvarchar_size=4094
> disable_optimizer=1, unique_index=0, use_declarefetch=1
> text_as_longvarchar=0, unknowns_as_longvarchar=0, bools_as_char=1
> extra_systable_prefixes='dd_;', conn_settings=''
> conn=87033980, query=' '
> conn=87033980, query='BEGIN'
> conn=87033980, query='set DateStyle to 'ISO'; set geqo to 'OFF''
> Command response: 'SET VARIABLE'
> conn=87033980, query='declare SQL_CUR87048472 cursor for select oid from pg_type where typname='lo''
> conn=87033980, query='fetch 100 in SQL_CUR87048472'
> [ fetched 0 rows ]
> conn=87033980, query='close SQL_CUR87048472'
> conn=87033980, query='END'
> conn=87033980, query='BEGIN'
> conn=87033980, query='declare SQL_CUR87114156 cursor for select relname, usename, relhasrules from pg_class, pg_user where relkind = 'r' and usename like 'postgres' and relname !~ '^pg_|^dd_' and relname !~ '^xinv[0-9]+' and int4out(usesysid) = int4out(relowner) order by relname'
> conn=87033980, query='fetch 100 in SQL_CUR87114156'
> [ fetched 2 rows ]

Query for database tables.

> conn=87033980, query='close SQL_CUR87114156'
> conn=87033980, query='END'
> conn=87033980, query='BEGIN'
> conn=87033980, query='declare SQL_CUR87114156 cursor for select u.usename, c.relname, a.attname, a.atttypid,t.typname, a.attnum, a.attlen, a.atttypmod, a.attnotnull from pg_user u, pg_class c, pg_attribute a, pg_type t where int4out(u.usesysid) = int4out(c.relowner) and c.oid= a.attrelid and a.atttypid = t.oid and (a.attnum > 0) and c.relname like 'contacts' order by attnum'
> conn=87033980, query='fetch 100 in SQL_CUR87114156'
> [ fetched 10 rows ]

Query for attributes of table 'contacts'.

> conn=87033980, query='close SQL_CUR87114156'
> conn=87033980, query='END'
> conn=87033980, query='BEGIN'
> conn=87033980, query='declare SQL_CUR87193300 cursor for select u.usename, c.relname, a.attname, a.atttypid,t.typname, a.attnum, a.attlen, a.atttypmod, a.attnotnull from pg_user u, pg_class c, pg_attribute a, pg_type t where int4out(u.usesysid) = int4out(c.relowner) and c.oid= a.attrelid and a.atttypid = t.oid and (a.attnum > 0) and c.relname like 'contacts' order by attnum'
> conn=87033980, query='fetch 100 in SQL_CUR87193300'
> [ fetched 10 rows ]

Another query for attributes of table 'contacts'.   That client/server for ya.

> conn=87033980, query='close SQL_CUR87193300'
> conn=87033980, query='END'
> conn=87033980, query='BEGIN'
> conn=87033980, query='declare SQL_CUR87114156 cursor for select c.relname, i.indkey, i.indisunique, i.indisclustered from pg_index i, pg_class c, pg_class d where c.oid = i.indexrelid and d.relname = 'contacts' and d.oid = i.indrelid'
> conn=87033980, query='fetch 100 in SQL_CUR87114156'
> [ fetched 0 rows ]

Query for  indexes in 'contacts'.     Looks like none!   Do any indices actually exist?   If so, could you cut this query out and run it in the psql monitor and notify me of the results.

> conn=87033980, query='close SQL_CUR87114156'
> conn=87033980, query='END'
> conn=87033980, query='BEGIN'
> conn=87033980, query='declare SQL_CUR87048472 cursor for select distinct on attnum a2.attname, a2.attnum from pg_attribute a1, pg_attribute a2, pg_class c, pg_index i where c.relname = 'contacts_pkey' AND c.oid = i.indexrelid AND a1.attrelid = c.oid AND a2.attrelid = c.oid AND (i.indkey[0] = a1.attnum OR i.indkey[1] = a1.attnum OR i.indkey[2] = a1.attnum OR i.indkey[3] = a1.attnum OR i.indkey[4] = a1.attnum OR i.indkey[5] = a1.attnum OR i.indkey[6] = a1.attnum OR i.indkey[7] = a1.attnum) order by a2.attnum'
> conn=87033980, query='fetch 100 in SQL_CUR87048472'
> [ fetched 0 rows ]

Query for attributes of index 'contact_pkey'.      Does this index actually exist?   If so, could you cut this query out and run it in the psql monitor and notify me of the results.




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: [INTERFACES] postgresODBC and Symantec dbAnywhere/Visual Cafe, broken?
@ 1998-08-10 12:47  David Hartwig <daveh@insightdist.com>
  1 sibling, 0 replies; 7+ messages in thread

From: David Hartwig @ 1998-08-10 12:47 UTC (permalink / raw)
  To: Matthew Hagerty <matthew@wolfepub.com>; +Cc: pgsql-interfaces



Matthew Hagerty wrote:

> I made the index and got a new error.  I don't know what to do.  Both
> parties (your company and Symantec) are pointing the finger in the other
> direction.  I will do everything in my power to provide all the information
> I can.  I'm kind of stuck in the middle.  So, as a last ditch effort, I
> made three tests and have sent the results to both parties.
>
> I know I sent most of this before, but this will put it all in one place
> for you.
>

...

> Basic test goes like this:
>
> 1. Clear all log files.
>    There are 3 files, one made by the postgres driver, one made by
> dbanywhere, and one made by the Windows ODBC administrator (trace tab).
> The files are named psqlodbc.log, dbanywhere.log, and odbc.log.  I have
> appended a number 1, 2, or 3 to the end, indicating which test they were
> made from.
>
> 2. Click the "start tracing now" button in the Windows ODBC administrator.
> 3. Start dbAnywhere.
> 4. Start Visual Cafe.
> 5. In Visual Cafe select view->dbNAVIGATOR
>    A navigation window pops up that displays items like Windows Explorer.
> 6. Click the "plus" next to "evaluation" (the name of the dbAnywhere server).
>    A list of data sources is shown.
> 7. Click the "plus" next to "PostgreSQL"
>    A window pops up asking for a username and password.
> 8. Enter a username and password.
>    A list of tables for the database "test" indicated in the ODBC set-up of
> the postgresql driver.
> 9. Click the "plus" next to the "contacts" table.
>    An error message window pops up.
> 10. Click "OK" in the error window.
> 11. Shutdown Visual Cafe.
> 12. Shutdown dbAnywhere.
> 13. Click the "stop tracing now" button in the Windows ODBC administrator.
> 14. Rename and copy the logs to a temp directory.
>
> Test 1:
> The first test was done with only the contacts and person tables in the
> test database.
>

Same as before...

> Test 2:
> The second test was done after I created an index called contacts_pkey by
> hand on the server with the following command:
>
> CREATE UNIQUE INDEX contacts_pkey ON contacts(id);
>
> I found the dbAnywhere error message *very* interesting for this test.
>

Indeed.   Notice the query on dd_fkey.   This is cause by dbAnywhere's request for
foreign keys of the table contact.    PostgreSQL does not support foreign keys.
However, we implemented a work around (hack by any other name) so that we (at
Insight) could use Visio and any other application that made such ODBC API
requests.   Surprisingly, his is the first application outside of  our company
that has raised this issue.

Ok, here's what you need to do:

CREATE TABLE dd_fkey (
    PRIMARY KEY (relname, attnames),
    relname name,                 -- base table name
    attnames varchar(128),    -- list of foreign attributes concatenated by '+'
(i.e. 'att1+att2' or just 'att1' )
    frelname NOT NULL      -- foreign table name
);

-- Example
INSERT INTO dd_fkey (relname, attnames, frelname) VALUES ('contact',
'att1+att2...', 'persons');

This assumes you have a foreign key on contact.    If not, just create the empty
table.  Lets see how far this gets us.

BTW, in version 6.4 we plan to use Vadim's triggers used to implement foreign keys
as the source for this information.

> Test 3:
> The third test was done with an index with an arbitrary name idx1 with the
> following command:
>
> DROP INDEX contacts_pkey;
> CREATE UNIQUE INDEX idx1 ON contacts(id);
>

It looks like dbAnyware is doing a specific request for primacy key.    And in
PostgreSQL primacy keys have the convention of having an index of '*_pkey'.




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: [INTERFACES] postgresODBC and Symantec dbAnywhere/Visual Cafe, broken?
@ 1998-08-10 15:20  Matthew Hagerty <matthew@wolfepub.com>
  1 sibling, 1 reply; 7+ messages in thread

From: Matthew Hagerty @ 1998-08-10 15:20 UTC (permalink / raw)
  To: David Hartwig <daveh@insightdist.com>; +Cc: pgsql-interfaces

>> Test 2:
>> The second test was done after I created an index called contacts_pkey by
>> hand on the server with the following command:
>>
>> CREATE UNIQUE INDEX contacts_pkey ON contacts(id);
>>
>> I found the dbAnywhere error message *very* interesting for this test.
>>
>
>Indeed.   Notice the query on dd_fkey.   This is cause by dbAnywhere's
request for
>foreign keys of the table contact.    PostgreSQL does not support foreign
keys.
>However, we implemented a work around (hack by any other name) so that we (at
>Insight) could use Visio and any other application that made such ODBC API
>requests.   Surprisingly, his is the first application outside of  our
company
>that has raised this issue.
>
>Ok, here's what you need to do:
>
>CREATE TABLE dd_fkey (
>    PRIMARY KEY (relname, attnames),
>    relname name,                 -- base table name
>    attnames varchar(128),    -- list of foreign attributes concatenated
by '+'
>(i.e. 'att1+att2' or just 'att1' )
>    frelname NOT NULL      -- foreign table name
>);
>
>-- Example
>INSERT INTO dd_fkey (relname, attnames, frelname) VALUES ('contact',
>'att1+att2...', 'persons');
>
>This assumes you have a foreign key on contact.    If not, just create the
empty
>table.  Lets see how far this gets us.
>
>BTW, in version 6.4 we plan to use Vadim's triggers used to implement
foreign keys
>as the source for this information.
>

David,

That worked...  I'm not sure how usefull it will be though.  Now when I
select the "plus" next to the contacts table, it lists the fields like this:

4
INTEGER
15
-blank-
0
0
0
-blank-
-blank-
-blank-
-blank-

When I select one of these items, all its properties are ghosted out.  Then
again, I'm not sure how it would look with say, Oracle or some other
database.  Do these RAD tools really increase a programmers development
time, or just change what he/she spends most of his/her time working on?
Visual Cafe and JBuilder seem like a large amount of money to only be able
to paint the GUI, or are biased to large RDBMSes that cost mega bucks and
only run on UN*X systems that cost just as much.  What are you using for
RAD Java apps?


Matthew




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: [INTERFACES] postgresODBC and Symantec dbAnywhere/Visual Cafe, broken?
@ 1998-08-10 20:21  David Hartwig <daveh@insightdist.com>
  parent: Matthew Hagerty <matthew@wolfepub.com>
  0 siblings, 0 replies; 7+ messages in thread

From: David Hartwig @ 1998-08-10 20:21 UTC (permalink / raw)
  To: Matthew Hagerty <matthew@wolfepub.com>; +Cc: pgsql-interfaces

Matthew Hagerty wrote:

> David,
>
> That worked...  I'm not sure how usefull it will be though.  Now when I
> select the "plus" next to the contacts table, it lists the fields like this:
>
> 4
> INTEGER
> 15
> -blank-
> 0
> 0
> 0
> -blank-
> -blank-
> -blank-
> -blank-
>

This may be a bug in the driver.   Every once and a while when we throw a new
application a the driver we find some imperfections in its implementation.   This
is our first attempt at dbAnywhere.   I am sure we can straighten this out, but we
are backed up right now.

> When I select one of these items, all its properties are ghosted out.  Then
> again, I'm not sure how it would look with say, Oracle or some other
> database.  Do these RAD tools really increase a programmers development
> time, or just change what he/she spends most of his/her time working on?
> Visual Cafe and JBuilder seem like a large amount of money to only be able
> to paint the GUI, or are biased to large RDBMSes that cost mega bucks and
> only run on UN*X systems that cost just as much.  What are you using for
> RAD Java apps?

Much of what you are experiencing is one time start-up cost.   For you this is a
new database and a new IDE.   For us, this is the first time with dbAnywhere.
These problems will work themselves out; future dbAnywhere users will hopefully
benefit from your experience.

To your question "What are you using for RAD Java apps?"   VB5   :-)




^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~1998-08-10 20:21 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-08-05 17:16 postgresODBC and Symantec dbAnywhere/Visual Cafe, broken? Matthew Hagerty <matthew@wolfepub.com>
1998-08-05 18:25 ` David Hartwig <daveh@insightdist.com>
1998-08-06 01:29 ` Matthew Hagerty <matthew@wolfepub.com>
1998-08-06 18:44   ` David Hartwig <daveh@insightdist.com>
1998-08-10 12:47 ` David Hartwig <daveh@insightdist.com>
1998-08-10 15:20 ` Matthew Hagerty <matthew@wolfepub.com>
1998-08-10 20:21   ` David Hartwig <daveh@insightdist.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox