X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 2B2205E46D4 for ; Sun, 29 Aug 2004 02:21:00 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 72909-09 for ; Sun, 29 Aug 2004 05:20:50 +0000 (GMT) Received: from ganymede.hub.org (blk-222-46-91.eastlink.ca [24.222.46.91]) by svr1.postgresql.org (Postfix) with ESMTP id 70BCD5E46C4 for ; Sun, 29 Aug 2004 02:20:50 -0300 (ADT) Received: by ganymede.hub.org (Postfix, from userid 1000) id 7F9E938FC3; Sun, 29 Aug 2004 02:20:50 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by ganymede.hub.org (Postfix) with ESMTP id 7E87A38F04 for ; Sun, 29 Aug 2004 02:20:50 -0300 (ADT) X-Return-Path: X-Received: from localhost ([unix socket]) by ganymede.hub.org (Cyrus v2.2.8) with LMTPA; Fri, 27 Aug 2004 14:06:59 -0300 X-Sieve: CMU Sieve 2.2 X-Received: from localhost (localhost.hub.org [127.0.0.1]) by ganymede.hub.org (Postfix) with ESMTP id DA166380A0 for ; Fri, 27 Aug 2004 14:05:53 -0300 (ADT) X-Received: from mail.postgresql.org [200.46.204.71] by localhost with IMAP (fetchmail-6.2.5) for scrappy@localhost (single-drop); Fri, 27 Aug 2004 14:05:53 -0300 (ADT) X-Received: from svr1.postgresql.org ([unix socket]) by svr1.postgresql.org (Cyrus v2.2.8) with LMTPA; Fri, 27 Aug 2004 14:05:26 -0300 X-Sieve: CMU Sieve 2.2 X-Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 812195E46E7 for ; Fri, 27 Aug 2004 14:05:26 -0300 (ADT) X-Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 79301-05 for ; Fri, 27 Aug 2004 17:05:19 +0000 (GMT) X-Received: from teheran.magic.fr (teheran.magic.fr [62.210.158.46]) by svr1.postgresql.org (Postfix) with ESMTP id AB7E55E46D2 for ; Fri, 27 Aug 2004 14:05:18 -0300 (ADT) X-Received: from lrp43008 (ppp-52.net-555.magic.fr [62.210.255.52]) by teheran.magic.fr (8.11.6/8.11.2) with SMTP id i7RH3Lx08982 for ; Fri, 27 Aug 2004 19:03:22 +0200 (CEST) Message-ID: <004d01c48c58$07421b00$0a00a8c0@lrp43008> Reply-To: =?iso-8859-1?Q?Secr=E9tariat?= From: =?iso-8859-1?Q?Secr=E9tariat?= To: Subject: OIDS column mandatory ? Date: Fri, 27 Aug 2004 19:05:13 +0200 Organization: Etablissements ROLLAND MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_004A_01C48C68.C7E7C840" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-DCC: : X-Spam-Pyzor: ReSent-Date: Sun, 29 Aug 2004 02:20:46 -0300 (ADT) Resent-From: "Marc G. Fournier" Resent-To: pgsql-odbc@postgresql.org ReSent-Subject: OIDS column mandatory ? ReSent-Message-ID: <20040829022045.J72121@ganymede.hub.org> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.1 tagged_above=0.0 required=5.0 tests=HTML_30_40, HTML_MESSAGE, UPPERCASE_25_50 X-Spam-Level: * X-Archive-Number: 200408/60 X-Sequence-Number: 4369 This is a multi-part message in MIME format. ------=_NextPart_000_004A_01C48C68.C7E7C840 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello ! I want to open a recordset using ODBC (07_03_0200) in MS-VB6 (SP6) on a PG = table (Linux 7.4.3) created WITHOUT OIDS. I receive an error message : 'Colum "oid" doesn't exist !' at the line rPG= .Open "tests"... Here are the table and the VB code. CREATE TABLE tests ( court int2 NOT NULL, entier int4, long int8, lib30 varchar(30) NOT NULL, texte text, valeur numeric(15,2) DEFAULT 0, datez timestamptz DEFAULT now(), logique bool DEFAULT false, radio char(1) DEFAULT 'V'::bpchar, CONSTRAINT tests_pk PRIMARY KEY (court) ) WITHOUT OIDS; GRANT ALL ON TABLE tests TO postgres WITH GRANT OPTION; Option Explicit Private cPG As New ADODB.Connection Private rPG As New ADODB.Recordset Private Sub Form_Load() Dim strCpg As String strCpg =3D "DSN=3DTESTS" strCpg =3D strCpg & ";UID=3Dpostgres" strCpg =3D strCpg & ";PWD=3Dpassword" strCpg =3D strCpg & ";Database=3DTESTS" cPG.Open strCpg rPG.Open "tests", cPG, adOpenDynamic, adLockBatchOptimistic, adCmdTable= Direct ... End Sub Private Sub Form_Unload(cancel As Integer) rPG.Close cPG.Close Set rPG =3D Nothing Set cPG =3D Nothing End Sub ODBC configuration (cPG returns) : Provider=3DMSDASQL.1; Extended Properties=3D"DSN=3DTESTS; _ DATABASE=3DTESTS;SERVER=3D192.168.0.15;PORT=3D5432; _ UID=3Dpostgres;PWD=3Dpassword; _ adOnly=3D0;Protocol=3D6.4;FakeOidIndex=3D0;ShowOidColumn=3D1; _ wVersioning=3D0;ShowSystemTables=3D0;ConnSettings=3D; _ tch=3D100;Socket=3D4096;UnknownSizes=3D0;MaxVarcharSize=3D254; _ xLongVarcharSize=3D8190;Debug=3D0;CommLog=3D0;Optimizer=3D1; _ qo=3D1;UseDeclareFetch=3D0;TextAsLongVarchar=3D1; _ knownsAsLongVarchar=3D0;BoolsAsChar=3D0; _ parse=3D0;CancelAsFreeStmt=3D0;ExtraSysTablePrefixes=3Ddd_;; _LFConversion= =3D1;UpdatableCursors=3D1;DisallowPremature=3D0; _ TrueIsMinus1=3D0;BI=3D-5;ByteaAsLongVarBinary=3D0;UseServerSidePrepare=3D0" Would pgsqlODBC require an OIDS column on all the tables ? Luc ------=_NextPart_000_004A_01C48C68.C7E7C840 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hello !
 
I want to open a recordset using=20 ODBC (07_03_0200) in MS-VB6 (SP6) on a PG table (Linux 7.4.3) cre= ated=20 WITHOUT OIDS.
I receive an error message  : 'C= olum=20 "oid" doesn't exist !' at the line rPG.Open "tests"...
Here are the table and the VB code.=
 
CREATE TABLE tests
(
  court in= t2 NOT=20 NULL,
  entier int4,
  long int8,
  lib30 varchar(3= 0)=20 NOT NULL,
  texte text,
  valeur numeric(15,2) DEFAULT=20 0,
  datez timestamptz DEFAULT now(),
  logique bool DEFAUL= T=20 false,
  radio char(1) DEFAULT 'V'::bpchar,
  CONSTRAINT=20 tests_pk PRIMARY KEY (court)
)
WITHOUT OIDS;
GRANT ALL ON TABLE te= sts=20 TO postgres WITH GRANT OPTION;
 
Option Explicit
Private cPG As New ADODB.Connection
Pri= vate rPG=20 As New ADODB.Recordset
 
Private Sub Form_Load()
    Dim strCpg As=20 String
    strCpg =3D=20 "DSN=3DTESTS"
    strCpg =3D strCpg &=20 ";UID=3Dpostgres"
    strCpg =3D strCpg &=20 ";PWD=3Dpassword"
    strCpg =3D strCpg &=20 ";Database=3DTESTS"
    cPG.Open strCpg
  &n= bsp;=20 rPG.Open "tests", cPG, adOpenDynamic, adLockBatchOptimistic,=20 adCmdTableDirect
    ...
End Sub
 
Private Sub Form_Unload(cancel As=20 Integer)
    rPG.Close
 &nbs= p; =20 cPG.Close
    Set rPG =3D Nothing
    S= et cPG=20 =3D Nothing
End Sub
ODBC configuration (cPG returns)=20 :
Provider=3DMSDASQL.1;
Extended=20 Properties=3D"DSN=3DTESTS; _
DATABASE=3DTESTS;SERVER=3D192.168.0.15;PORT=3D54= 32;=20 _
UID=3Dpostgres;PWD=3Dpassword; _
adOnly=3D0;Protocol=3D6.4;FakeOidIndex=3D0;ShowOidColumn=3D1; _
wVersioning=3D0;ShowSystemTables=3D0;ConnS= ettings=3D;=20 _
tch=3D100;Socket=3D4096;UnknownSizes=3D0;MaxVarcharSize=3D254; _
xLongVarcharSize=3D8190;Debug=3D0;CommLog=3D0;Optimizer=3D1; _
qo=3D1;UseDeclareFetch=3D0;TextAsLongVarch= ar=3D1;=20 _
knownsAsLongVarchar=3D0;BoolsAsChar=3D0; _=
parse=3D0;CancelAsFreeStmt=3D0;ExtraSysTablePrefixes=3Ddd_;;=20 _LFConversion=3D1;UpdatableCursors=3D1;DisallowPremature=3D0; _
TrueIsMinus1=3D0;BI=3D-5;ByteaAsLongVarBinary=3D0;UseServerSidePre= pare=3D0"
 
Would pgsqlODBC require an OIDS column on = all the=20 tables ?
 
Luc

------=_NextPart_000_004A_01C48C68.C7E7C840--