Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie need help with peachtree and access using Btreive.

Status
Not open for further replies.

samlaleo

Programmer
Nov 30, 2005
3
MY
hi there, everyone
my name is samlaleo
i am new to asp programming using Access and also peachtree.i have 3 days to start this process.can anyone help

1)how do i setup ODBD and link in ASP and what kinda of drivers do i need.
2)how can i extract information from peachtree and add onto my access database.
3)or are there sites that i can visit to help me further.
any kind of help will surely save me.

thx in advance to everyone here.
 
thx mirteil ,

the link is very helpful
if get the ODBC setup how do i link the driver in asp?
do you by any chance have a simple code to call the procedure ?

thx a million
sam
 
Accessing an ODBC driver from ASP is fairly standard. Here's a very simple example I use to test connectivity:
Code:
<%@ Language=VBScript %>
<html>
<head>
<body>
<%
Dim objConn
dim rsTemp
Set objConn = server.CreateObject("ADODB.Connection")
set rstemp = Server.CreateObject("ADODB.RecordSet")
objConn.ConnectionString = "DSN=demodata"
dim strCon, strDbPathAndName

objConn.Open strCon

mySQL = "Select * from class"
set rstemp=objConn.Execute(mySQL)
%>
<table border="1"><tr>
<% 'Put Headings On The Table of Field Names
for each whatever in rstemp.fields%>
       <td><b><%=whatever.name%></b></td>
<% next %>
</tr>

<% 
' Now lets grab all the records
DO  UNTIL rstemp.eof %>
   <tr>
   <% for each whatever in rstemp.fields
      thisfield=whatever.value
      if isnull(thisfield) then
         thisfield="&nbsp;"
      end if
      if trim(thisfield)="" then
         thisfield="&nbsp;"
      end if%>
             <td valign="top"><%=thisfield%></td>
   <% next %>
   </tr>
   <%rstemp.movenext
LOOP%>
</table>

<%
rstemp.close
set rstemp=nothing
objConn.Close
set objConn=nothing
%>
</body>
</html>
You'll need to change the connection string ("DSN=") to match your Data Source Name and you'll need to change the SQL statement ("Select * from class") to match what you need to access.

Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
Custom VB and Btrieve development.
 
thx a million mirtheil,

great example.

so this mean if i wanna get the data from peachtree all i have to do is change the "server.CreateObject("ADODB.Connection")" to "pervasive drive"? am i right?

i since downloaded the sql8 30 days trial (Version 8.7 build 014)from pervasive site to see how it can help me get the data from peachtree,but the problem i face is when i install it says updating ODBC driver and never seem to finish installing."confused"
any idea why?

i know this sound like i am pain in the butt, but i really appreciate the help i can get.

P.S. since my company have Peachtree complete 2003 do i need to purchase the pervasive drivers if it meets my requiremen?

thx in advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top