Re: [SQL] convert to a string

2007-03-06 Thread Shavonne Marietta Wijesinghe
postgresql.org Sent: Tuesday, March 06, 2007 2:54 PM Subject: Re: [SQL] convert to a string I assume GetFieldValue is the name of a VB function or property get? Try either Set oRs = oConn.Execute("SELECT N_GEN::int FROM MyTable ORDER BY N_GEN DESC") or

Re: [SQL] convert to a string

2007-03-06 Thread Bart Degryse
PROTECTED] ) To: pgsql-sql@postgresql.org Sent: Tuesday, March 06, 2007 2:54 PM Subject: Re: [SQL] convert to a string I assume GetFieldValue is the name of a VB function or property get? Try either Set oRs = oConn.Execute("SELECT N_GEN::int FROM MyTable ORDER BY N_GEN DESC") or GetFie

Re: [SQL] convert to a string

2007-03-06 Thread Shavonne Marietta Wijesinghe
M Subject: Re: [SQL] convert to a string I assume GetFieldValue is the name of a VB function or property get? Try either Set oRs = oConn.Execute("SELECT N_GEN::int FROM MyTable ORDER BY N_GEN DESC") or GetFieldValue = cint(oRs("N_GEN")) + 1 or GetFieldV

Re: [SQL] convert to a string

2007-03-06 Thread A. Kretschmer
am Tue, dem 06.03.2007, um 14:42:53 +0100 mailte Shavonne Marietta Wijesinghe folgendes: > Hello > > i have a column N_GEN in postgreSql defined as text. In this coloumn i insert > a > number 10 Why do you store numbers as text? > > N_GEN (text) = 10 > > > on error resume next > Set o

Re: [SQL] convert to a string

2007-03-06 Thread Bart Degryse
I assume GetFieldValue is the name of a VB function or property get? Try either Set oRs = oConn.Execute("SELECT N_GEN::int FROM MyTable ORDER BY N_GEN DESC") or GetFieldValue = cint(oRs("N_GEN")) + 1 or GetFieldValue = clng(oRs("N_GEN")) + 1 In the last two cases make sure that the funct

[SQL] convert to a string

2007-03-06 Thread Shavonne Marietta Wijesinghe
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 GetFieldVal