Skip site navigation (1) Skip section navigation (2)

.NET ODBC Data Provider

From: Dave Page <dpage(at)vale-housing(dot)co(dot)uk>
To: "'pgsql-odbc(at)postgresql(dot)org'" <pgsql-odbc(at)postgresql(dot)org>
Subject: .NET ODBC Data Provider
Date: 2002-03-26 21:19:20
Message-ID: FED2B709E3270E4B903EB0175A49BCB1293305@dogbert.vale-housing.co.uk (view raw or flat)
Thread:
Lists: pgsql-odbc
As I mentioned in an earlier message, I've been playing with C# & .NET. In
.NET, unlike ADO it is possible to write your own INSERT/UPDATE/DELETE
parameterised queries to handle updates to a DataSet - if you do, then you
have a 'dynamic recordset', otherwise it's a very lightweight data cache (or
somewhere in between). An OdbcCommandBuilder object can be used to
auto-generate the queries from the SELECT as ADO does.

I'm having a problem persuading the an OdbcCommandBuilder object to generate
queries from a SELECT query - basically it just fails silently. Hunting
around on Google, others have reported the same problem with Foxpro where it
was put down to problems with the ODBC *and* OLE DB drivers.

I have tried both the release driver, and experimental ODBC3 driver - a
commlog from the latter is included below. Any help would be appreciated.

Regards, Dave.

Global Options: Version='07.01.0010', fetch=100, socket=4096,
unknown_sizes=0, max_varchar_size=254, max_longvarchar_size=8190
                disable_optimizer=1, ksqo=1, unique_index=1,
use_declarefetch=0
                text_as_longvarchar=1, unknowns_as_longvarchar=0,
bools_as_char=1
                extra_systable_prefixes='dd_;', conn_settings='',
protocol='6.4'
conn=53899000, query=' '
conn=53899000, query='set DateStyle to 'ISO''
conn=53899000, query='set geqo to 'OFF''
conn=53899000, query='set ksqo to 'ON''
conn=53899000, query='select oid from pg_type where typname='lo''
    [ fetched 1 rows ]
    [ Large Object oid = 151413 ]
conn=53899000, query='select version()'
    [ fetched 1 rows ]
    [ PostgreSQL version string = 'PostgreSQL 7.2 on i686-pc-cygwin,
compiled by GCC 2.95.3-5' ]
    [ PostgreSQL version number = '7.2' ]
conn=53899000, PGAPI_DriverConnect(out)='(null)'
CONN ERROR: func=PGAPI_GetInfo, desc='', errnum=209, errmsg='Unrecognized
key passed to PGAPI_GetInfo.'
            ------------------------------------------------------------
            henv=53937024, conn=53899000, status=1, num_stmts=16
            sock=53936976, stmts=53936896, lobj_type=151413
            ---------------- Socket Info -------------------------------
            socket=684, reverse=0, errornumber=0, errormsg='(NULL)'
            buffer_in=53909920, buffer_out=53914024
            buffer_filled_in=101, buffer_filled_out=0, buffer_read_in=101
CONN ERROR: func=PGAPI_GetInfo30, desc='', errnum=209, errmsg='Unrecognized
key passed to SQLGetInfo30.'
            ------------------------------------------------------------
            henv=53937024, conn=53899000, status=1, num_stmts=16
            sock=53936976, stmts=53936896, lobj_type=151413
            ---------------- Socket Info -------------------------------
            socket=684, reverse=0, errornumber=0, errormsg='(NULL)'
            buffer_in=53909920, buffer_out=53914024
            buffer_filled_in=101, buffer_filled_out=0, buffer_read_in=101
STATEMENT ERROR: func=set_statement_option, desc='fOption=1228, vParam=0',
errnum=10, errmsg='Unknown statement option (Set)'
 
------------------------------------------------------------
                 hdbc=53899000, stmt=53936512, result=0
                 manual_result=0, prepare=0, internal=0
                 bindings=0, bindings_allocated=0
                 parameters=0, parameters_allocated=0
                 statement_type=-2, statement='(NULL)'
                 stmt_with_params='(NULL)'
                 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=set_statement_option, desc='fOption=1228, vParam=0',
errnum=28, errmsg='Unsupported connection option (Set)'
            ------------------------------------------------------------
            henv=53937024, conn=53899000, status=1, num_stmts=16
            sock=53936976, stmts=53936896, lobj_type=151413
            ---------------- Socket Info -------------------------------
            socket=684, reverse=0, errornumber=0, errormsg='(NULL)'
            buffer_in=53909920, buffer_out=53914024
            buffer_filled_in=101, buffer_filled_out=0, buffer_read_in=101
STATEMENT ERROR: func=set_statement_option, desc='fOption=1227, vParam=0',
errnum=10, errmsg='Unknown statement option (Set)'
 
------------------------------------------------------------
                 hdbc=53899000, stmt=53936512, result=0
                 manual_result=0, prepare=0, internal=0
                 bindings=0, bindings_allocated=0
                 parameters=0, parameters_allocated=0
                 statement_type=-2, statement='(NULL)'
                 stmt_with_params='(NULL)'
                 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=set_statement_option, desc='fOption=1227, vParam=0',
errnum=28, errmsg='Unsupported connection option (Set)'
            ------------------------------------------------------------
            henv=53937024, conn=53899000, status=1, num_stmts=16
            sock=53936976, stmts=53936896, lobj_type=151413
            ---------------- Socket Info -------------------------------
            socket=684, reverse=0, errornumber=0, errormsg='(NULL)'
            buffer_in=53909920, buffer_out=53914024
            buffer_filled_in=101, buffer_filled_out=0, buffer_read_in=101
conn=53899000, query='SELECT id, data, accessed FROM csharptest'
    [ fetched 2 rows ]
conn=53899000, PGAPI_Disconnect

--- END ---

pgsql-odbc by date

Next:From: Hiroshi InoueDate: 2002-03-26 21:20:24
Subject: Re: psqlODBC ODBC3.0/Column Names
Previous:From: Dave PageDate: 2002-03-26 16:37:03
Subject: psqlODBC ODBC3.0/Column Names

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group