pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Shavonne Marietta Wijesinghe <shavonne.marietta@studioform.it>
To: pgsql-sql@postgresql.org
Subject: convert to a string
Date: Tue, 6 Mar 2007 14:42:53 +0100
Message-ID: <011901c75ff5$57a38930$1102a8c0@dream> (raw)

Hello 

i have a column N_GEN in postgreSql defined as text. In this coloumn i insert a number 10

N_GEN (text) = 10


on error resume next
  Set oRs = oConn.Execute("SELECT N_GEN FROM MyTable ORDER BY N_GEN DESC")
  If err <> 0 then 'If table not found
   GetFieldValue = "1"
  else
   GetFieldValue = oRs("N_GEN") + 1
  End If

But it doesn't add the 1 to my N_GEN
How can i set the Recordset to convert the string to a number and then add 1 to it??

Shavonne Wijesinghe
http://www.studioform.it

 

view thread (6+ messages)  latest in thread

Message-ID: <011901c75ff5$57a38930$1102a8c0@dream>
Permalink:  ../011901c75ff5$57a38930$1102a8c0@dream/
Also on:    postgresql.org/message-id/011901c75ff5$57a38930$1102a8c0@dream

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: shavonne.marietta@studioform.it
  Subject: Re: convert to a string
  In-Reply-To: <011901c75ff5$57a38930$1102a8c0@dream>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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