944,031 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 1077
  • ASP.NET RSS
Apr 29th, 2007
0

pulling info from foxpro db via asp? help!

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
tjstockton is offline Offline
1 posts
since Apr 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: quick question
Next Thread in ASP.NET Forum Timeline: Problems with loading blackplanet.com





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC