•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 426,180 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,823 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 715 | Replies: 0
![]() |
•
•
Join Date: Apr 2007
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
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
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
![]() |
•
•
•
•
•
•
•
•
DaniWeb ASP.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Programming FAQ - Updated 1/March/2005 (Computer Science and Software Design)
- Need help with Caesar Cipher program (Java)
- Hide source of the page (PHP)
- help with detals view, looking up data from another table (ASP.NET)
- Popup window on button click (ASP.NET)
- help with functions (Python)
- PHP, ASP, ColdFusion, what's your fav? (IT Technologies and Trends)
- Looking for networking software (Networking Hardware Configuration)
- Dedicated Server (Networking Hardware Configuration)
Other Threads in the ASP.NET Forum
- Previous Thread: quick question
- Next Thread: Problems with loading blackplanet.com


Linear Mode