View Single Post

   
  #1 (permalink)  
Old 04-19-2008, 04:10 PM
Shavonne Marietta Wijesinghe
 
Posts: n/a
Default convert to a string

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



Reply With Quote