|
-
Feb 17th, 2000, 01:18 AM
#1
Thread Starter
Member
Hi
I have the following code, I want to display the result of query to the text box area. It display fine except it did align right.
<%
Sub querygetref(mySQLX)
myDSN="DSN=INVENTORY;User Id=xxx;password=xxx"
set rstemp=Server.CreateObject("adodb.connection")
'Set rstemp = Server.CreateObject("ADODB.Recordset")
'rstemp.Open "main", myDSN', 'adOpenStatic, adLockReadOnly, adCmdTable
rstemp.open myDSN
sqltemp=(mySQLX)
Set xrstemp = Server.CreateObject("ADODB.Recordset")
xrstemp.Open sqltemp, rstemp, 2
do while not xrstemp.eof
thisfield=trim(xRStemp(0))
thisfield1=trim(xRStemp(1))
if isnull(thisfield) or thisfield="" then
' ignore
else
Response.Write thisfield
Response.Write ": "
Response.Write thisfield1
end if
xrstemp.movenext
loop
xrstemp.close
set xrstemp=nothing
rstemp.close
set rstemp=nothing
end sub
%>
<p align=center><textarea name="CODE" rows="11" cols="30">
<%CALL querygetref("select ID, manufactor_model from HWtable order by ID")
%>
</textarea></p>
I try to insert reponse.write "<BR>" into the function but it did not work.
Thanks...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|