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

Re: Unicode display in VB

From: "Simeo Reig" <simreig(at)terra(dot)es>
To: <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: Unicode display in VB
Date: 2001-11-10 20:27:51
Message-ID: 004d01c16a26$2ba500e0$0a00a8c0@win2000 (view raw or flat)
Lists: pgadmin-hackerspgsql-odbc
Hi, I have this simple code that uses ADO to insert a row in a test table
with a serial id and a varchar,
after insert I can obtain varchar's value but I *can't* obtain id's value of
this record. What I'm doing wrong ??

*Table definition:

    mydatabase-# \d societats;
         idsocietat    | integer               | not null default
         nomsocietat   | character varying(50) |
         capitalsocial | double precision      | default 0

*Postgres 7.1.3 under FreeBSD 4.4

*VB code

Private Sub Command3_Click()

  ' Dims omited
   Set Cnxn = New ADODB.Connection
   strCnxn = "Provider=MSDASQL.1;Persist Security Info=False;Data
   Cnxn.Open strCnxn
   Set rstEmployees = New ADODB.Recordset
   strSQL = "societats"

   rstEmployees.Open strSQL, strCnxn, adOpenKeyset, adLockOptimistic,

   strFirstName = Trim(InputBox("Put name:"))
        rstEmployees!nomsocietat = strFirstName

   ' Show the newly added data
    MsgBox "New record: " & rstEmployees!idsocietat & " " &

    '''''rstEmployees!idsocietat returns nothing !!!!!!!!!!!!!!

   Set rstEmployees = Nothing
   Set Cnxn = Nothing

End Sub

In response to

pgsql-odbc by date

Next:From: Simeo ReigDate: 2001-11-10 20:55:58
Subject: Last inserted id
Previous:From: Hiroshi InoueDate: 2001-11-10 01:13:30
Subject: Re: [ODBC] Unicode display in VB

pgadmin-hackers by date

Next:From: Peter EisentrautDate: 2001-11-11 15:40:26
Subject: Re: Diff/Patch integration -> SQL cvs clone
Previous:From: Jean-Michel POUREDate: 2001-11-10 17:29:56
Subject: Diff/Patch integration -> SQL cvs clone

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