i am working with a client who has their Inventory stored in a FoxPro database. i need to pull that info from the database and publish it on their website. i have read & read & read but cannot figure out what i'm doing wrong!!
here's the code:
<HTML>
<HEAD>
<TITLE>testing...</TITLE>
</HEAD>
<BODY>
<H3>Inventory</H3>
<%
Set Conn = Server.CreateObject("ADODB.connection")
ConnStr= "Driver=Microsoft Visual Foxpro Driver; " + _
"UID=;SourceType=DBC;SourceDB=Inventory.dbf"
Conn.Open ConnStr
Set cmdTemp = Server.CreateObject("ADODB.Command")
Set rs = Server.CreateObject("ADODB.Recordset")
SQLText="Select Inventory.Year" + _
"Inventory.Make,"+ _
"Inventory.Model,"+ _
"Inventory.Bodystyle,"+ _
"Inventory.Stocknumb,"+ _
"Inventory.Dryweight,"+ _
"Inventory.Newused"
cmdTemp.CommandText = SQLText
cmdTemp.CommandType = 1
Set cmdTemp.ActiveConnection = Conn
rs.CacheSize = 10
rs.Open cmdTemp,,adopenstatic
%>
<P>
<TABLE BORDER=1>
<TR>
<% For i = 0 to RS.Fields.Count - 1 %>
<TD><B><% = RS(i).Name %></B></TD>
<% Next %>
</TR>
<% Do While Not RS.EOF %>
<TR>
<% For i = 0 to RS.Fields.Count - 1 %>
<TD VALIGN=TOP><% = RS(i) %></TD>
<% Next %>
</TR>
<%
RS.MoveNext
Loop
RS.Close
Conn.Close
%>
</TABLE>
<BR>
<BR>
</BODY>
</HTML>
database is named "Inventory.dbf" and the columns i'm trying to display (all of them) are: Year, Make, Model, Bodystyle, Stocknumb, Dryweight, Newused
any help would be greatly appreciated. i'm losing my mind!!! thx