Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

selecting integer

Status
Not open for further replies.

hkung

Programmer
Jan 9, 2001
19
0
0
MY
I have a sql statement which will select an integer column from oracle database. Below are the codes :
*****************************************
sqlSelect =
"select id from temptable where " & _
"trans_id = '123'"

Set rs = conn.Execute (sqlSelect)

id = rs(0)
Response.Write &quot;id = &quot; & id & &quot;<br>&quot;
*****************************************
I'm not able to print out the value using Response.Write, even if i do this : id = CStr(rs(0))

The only solution i found was to change the select statement
to &quot;select to_char(id) from temptable where trans_id = '123'&quot;.

My question is, doesn't asp treat all the resultset values as string? Thanks in advance.





 
You are trying to select a number but have the number in quotes. I'm not sure if you have to do that in Oracle as I have never used it.

However, try this:

&quot;select id from temptable where trans_id = 123&quot; Mighty :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top