Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 775999FB602 for ; Tue, 6 Mar 2007 09:42:53 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 02623-07 for ; Tue, 6 Mar 2007 09:42:49 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from smtpout22.attiva.biz (smtpout22.attiva.biz [85.37.16.9]) by postgresql.org (Postfix) with ESMTP id 78C879FB4B5 for ; Tue, 6 Mar 2007 09:42:49 -0400 (AST) Received: from FBCMFE02B15.fbc.local ([192.168.30.161]) by smtpout22.attiva.biz with Microsoft SMTPSVC(6.0.3790.1830); Tue, 6 Mar 2007 14:42:47 +0100 Received: from dream ([88.34.161.130]) by FBCMFE02B15.fbc.local with Microsoft SMTPSVC(6.0.3790.1830); Tue, 6 Mar 2007 14:42:46 +0100 Message-ID: <011901c75ff5$57a38930$1102a8c0@dream> Reply-To: "Shavonne Marietta Wijesinghe" From: "Shavonne Marietta Wijesinghe" To: Subject: convert to a string Date: Tue, 6 Mar 2007 14:42:53 +0100 Organization: Studio FORM MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0116_01C75FFD.B8FEF630" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3028 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-OriginalArrivalTime: 06 Mar 2007 13:42:46.0719 (UTC) FILETIME=[52FB84F0:01C75FF5] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.32 tagged_above=0 required=5 tests=AWL, BAYES_50, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200703/31 X-Sequence-Number: 27669 This is a multi-part message in MIME format. ------=_NextPart_000_0116_01C75FFD.B8FEF630 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello=20 i have a column N_GEN in postgreSql defined as text. In this coloumn i = insert a number 10 N_GEN (text) =3D 10 on error resume next Set oRs =3D oConn.Execute("SELECT N_GEN FROM MyTable ORDER BY N_GEN = DESC") If err <> 0 then 'If table not found GetFieldValue =3D "1" else GetFieldValue =3D 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 =20 ------=_NextPart_000_0116_01C75FFD.B8FEF630 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello

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

N_GEN (text) =3D 10
 
 
on error resume next
  Set = oRs =3D=20 oConn.Execute("SELECT N_GEN FROM MyTable ORDER BY N_GEN = DESC")
  If=20 err <> 0 then 'If table not = found
   GetFieldValue =3D=20 "1"
  else
   GetFieldValue =3D = oRs("N_GEN") +=20 1
  End If
 
But it doesn't add the 1 to my N_GEN
How can i set the Recordset = to=20 convert the string to a number and then add 1 to it??
 
Shavonne Wijesinghe
http://www.studioform.it
 
 
------=_NextPart_000_0116_01C75FFD.B8FEF630--