Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Extra column is getting built

Reply
Thread Tools

Extra column is getting built

 
 
Jack
Guest
Posts: n/a
 
      09-16-2004
Hi,
I got a code that is supposed to build first column as blank and then columns
corresponding to the query. However, the final result is coming with one
extra column where the vendor code values goes into the extra column while
the Vendor Code column is blank. Appreciate any help.
Thanks


CODE:

%@ Language=VBScript %>
<HTML>
<TITLE> Table Procedure </TITLE>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>

<%
'Procedure to create a table
Sub MakeTable(sourcein, dsnin)
Dim oRSmt
Set oRSmt = Server.CreateObject("ADODB.Recordset")
oRSmt.Open sourcein, "DSN=" & dsnin

oRSmt.MoveFirst
Response.Write "<TABLE BORDER = 1><TR>"

Response.Write "<TH>" & "&nbsp;</TH>"
For Each objField in oRSmt.Fields
Response.Write "<TH>" & objField.name & "</TH>"
Next

Do While Not oRSmt.EOF

Response.Write "<TR>"
For Each obFld in oRSmt.Fields
Response.Write "<TD>" & "&nbsp;</TD>"
Response.Write "<TD>" & obFld.value & "&nbsp;</TD>"


Next
oRSmt.MoveNext
Response.Write "</TR>"
Loop

Response.Write "</TABLE>"
oRSmt.Close
Set oRSmt = Nothing
End Sub
%>

<%call MakeTable("Select VendorName, VendorCode from Vendors
where VendorCode = 'ph'", "Clothiers")%></P>

</BODY>
</HTML>

 
Reply With Quote
 
 
 
Reply

Thread Tools

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Does return-by-value mean extra copies and extra overhead? mathieu C++ 3 09-04-2009 04:25 PM
Find Missing Column and Extra Column Rahul Perl Misc 5 03-19-2007 06:48 PM
I'm getting an extra, unwanted attribute Paul J. Lucas Java 2 02-18-2007 09:38 PM
Getting error adding an extra header to datagrid AMD Desktop ASP .Net 3 11-02-2004 09:09 PM
Recurring problem, getting rid of extra space (no <br>)??? fitwell HTML 2 10-20-2003 01:27 PM



Advertisments