Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > formatting sql recordset

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-06-03, 07:45
gleech gleech is offline
Registered User
 
Join Date: Dec 2002
Posts: 20
Wink formatting sql recordset

Dear All,

I have some SQL data which I want to format using VBScript on an ASP page. The SQL data is like this:

FieldName data1
FieldName data2
FieldName data3
FieldName data4

I want to format the front-end code so it reads like this:

FieldName data1
data2
data3
data4

Can anyone help?

Cheers

Gill
Reply With Quote
  #2 (permalink)  
Old 05-06-03, 09:03
rhs98 rhs98 is offline
Moderator
 
Join Date: Feb 2002
Location: Hampshire, UK
Posts: 440
What is the problem your having?

Is it that you do not know where to start? If so, read the ASP guide on http://www.w3schools.com to save us having to explain it again. Or use Google.

It would be something like this
Code:
'create and open the rs while not(rs.eof or rs.bof) for x=1 to 4 if x=1 then response.write rs.fields(1).name & " " end if response.write rs.fields(x).value & "<br />" next rs.movenext endw 'close rs and set to nothing

Last edited by rhs98 : 05-06-03 at 09:06.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On