User Name Password Register
DaniWeb IT Discussion Community
All
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
Reply
Join Date: Apr 2007
Posts: 1
Reputation: tjstockton is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
tjstockton tjstockton is offline Offline
Newbie Poster

pulling info from foxpro db via asp? help!

  #1  
Apr 29th, 2007
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
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ASP.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 6:28 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC