Hey,
This script is supposed to pull all the field names from a table and make an associate array with those set to "test".
As you can tell, it doesn't run, because the key is set to --> theFieldNames("COLUMN_NAME") <-- instead of theFieldNames("COLUMN_NAME")'s value. I tried wrapping it in Eval, and that didn't work either. Help?
Thanks,
Rick
RISTMO Designs: Rockwall Web Design
Arab Church: Arabic Christian Resources
Genuine Autos: Kaufman Chevrolet & Pontiac Dealer
Rick Morgan's Official Website
This script is supposed to pull all the field names from a table and make an associate array with those set to "test".
Code:
<%@ LANGUAGE="VBSCRIPT" %>
<!-- #INCLUDE file="testADO.asp"-->
<%
Dim theFieldNames, theOtherFields
Set theotherFields=Server.CreateObject("Scripting.Dictionary")
Set theFieldNames = theConn.Execute("select * from INFORMATION_SCHEMA.columns where TABLE_NAME = 'testTable'")
Do While Not theFieldNames.EOF
%><%= theFieldNames("COLUMN_NAME") %><br><%
theOtherFields.Add theFieldNames("COLUMN_NAME"),"test"
theFieldNames.moveNext
Loop
Response.Write("AID: " & theOtherFields.Item("AID") + "<br>")
%>
As you can tell, it doesn't run, because the key is set to --> theFieldNames("COLUMN_NAME") <-- instead of theFieldNames("COLUMN_NAME")'s value. I tried wrapping it in Eval, and that didn't work either. Help?
Thanks,
Rick
RISTMO Designs: Rockwall Web Design
Arab Church: Arabic Christian Resources
Genuine Autos: Kaufman Chevrolet & Pontiac Dealer
Rick Morgan's Official Website