473,508 Members | 2,400 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Extra column is getting built

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>

Jul 19 '05 #1
0 1177

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
9805
by: Dylan Nicholson | last post by:
Seems that Oracle 9.2 (using MS ODBC driver) requires extra parentheses when adding multiple columns to a table: ALTER TABLE MyTable ADD (MyColumn1 VARCHAR(255), MyColumn2 VARCHAR(255)) vs ...
2
2480
by: A.M. de Jong | last post by:
How may extra bits does a NULL column contain. And how many extra bits does a varchar column contain. (I 've worked with Ingres and in that environment it both needed 2 extra bits) Bye, ...
4
1605
by: Al Christoph | last post by:
I have a number of datasets that contains lots of engineering type data. Things are in lengths, forces, energies, times, etc etc. The datasets have two underlying natures: 1. The product dataset...
1
2198
by: Trent | last post by:
I am in the design phase of a new database and am having a devil of a time with a subform. I have three tables that relate to problem - Suppliers tbl, Customers tbl and a SuppliersCustomers tbl....
5
4907
by: objectref | last post by:
Hi to all, i populate a ListView with data from a datareader and i just want to know the column name of the cell that the user clicks on. E.x., if the user clicks on the 2nd column, 3rd row in...
1
4213
by: sianan | last post by:
I tried to use the following example, to add a checkbox column to a DataGrid in an ASP.NET application: http://www.codeproject.com/aspnet/datagridcheckbox.asp For some reason, I simply CAN'T get...
6
10642
by: Aaron Smith | last post by:
Ok. I have a dataset that has multiple tables in it. In one of the child tables, I have a column that I added to the DataSet (Not in the DataSource). This column does not need to be stored in the...
0
2354
by: Mike | last post by:
Hey everyone... I've got three problems with a custom DataGridView column I've built following the "How To: Host Controls in Windows Forms DataGridView Cells" article. The base editing control...
1
1473
by: Byomokesh | last post by:
Hi All, This XML file is 2 errors. My table is 3 columns. One is extra column and another is missing one columne. How i will find those error through perl script. XML file ------------ ...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7114
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7321
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7377
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7488
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5045
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
412
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.