954,593 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

pulling info from foxpro db via asp? help!


Inventory
<%
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
%>



<% For i = 0 to RS.Fields.Count - 1 %>
<% = RS(i).Name %>
<% Next %>

<% Do While Not RS.EOF %>

<% For i = 0 to RS.Fields.Count - 1 %>
<% = RS(i) %>
<% Next %>

<%
RS.MoveNext
Loop
RS.Close
Conn.Close
%>


tjstockton
Newbie Poster
1 post since Apr 2007
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You