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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Btrieve 6.15 and ASP

Status
Not open for further replies.

janpetrucci

Programmer
Oct 8, 2001
31
US
We use Btrieve 6.15 .DF files on Novelle server.

I would like to display data from these files through our NT4 server, using ASP. I am somewhat familiar with Btrieve, but I did not create the DF's.

I usually create the ASP pages locally using PWS and upload them to the server.

I have seen many different versions of connecting to the btrieve files. I would like to use ODBC.

Can anyone give any guidance on the best way of accomplishing this? Can I create the ASP pages the same as if I were connecting to an Access mdb?

Any help would be greatly appreciated.

 
To connect with ASP to a Btrieve database, you have a couple of options. The first is to use an ODBC driver and use ADO in the ASP page. The second option is to build an ISAPI DLL that makes Btrieve or ODBC calls.
To use ODBC, you'll need the ODBC v2.04 (last version, if you can find it) and DDFs. To use the ISAPI DLL making Btrieve calls you won't need the DDFs but will need to know the structure of the tables.
Is there a reason you're still using 6.15? Pervasive.SQL 2000i is much better for this as the ODBC Driver is still supported (6.15 and it's ODBC driver aren't supported) and offers more stability than the 2.04 driver (the 2.0x driver originally had some threading problems). There is a trial version of the PSQL2000 on Pervasive's web site ( mirtheil@mirtheil.com
Custom VB and Btrieve development.
Certified Pervasive Developer
Certified Pervasive Technician
 
Thanks for replying.

My company is hesitant to try any new product from Btrieve.

I was told they tried to upgrade to version 7 and had many problems, so they stayed with 6.15.

The entire comapny runs on Btrieve 6.15 and COBOL.

There are only four COBOL programmers here...not enough to maintain all programs and upgrade the entire system.

I am the only ASP programmer and right now the only work I can do is from an Access database. All other on-line products have to be done trough a thin-client executable sent to our users. I think they are seeing the limitations of this.

Believe it or not we actually have Pervasive SQL 2000 on our NT server. It was put there by a consulting company who was trying to connect to the Btrieve files through ASP...it did not work out too well.

I called Pervasive to find out about exporting the Btrieve files into SQL2000. I was told that they "should" export into SQL2000 but I "may" need to convert them to Btrieve 7 first and ofcourse I could find out from a tech for $150.00 per call. None of the programmers know anything about the SQL2000. They have only worked with Btrieve 6.15 and they are hesitant to use SQL.

Is the ISAPI DLL very difficult to set up? What do you mean by the structure of the tables...the COB?

Thanks again!
 
Sorry you've had problems with Pervasive in the past. The current version Pervasive.SQL 2000 SP4 is probably one of the best versions they've released in a long time.
You shouldn't have to convert the data at all. As long as you've got DDFs that match the data files, you shouldn't convert the data at all.
In terms of working with PSQL2000, the Btrieve side of things is still there and all of the Btrieve apps should still work correctly. For the ASP side of things, you'd be going through an ODBC Datasource and issuing SQL statements. There's probably some samples on Pervasive's web site.
In terms of the ISAPI DLL, I haven't done one just because ODBC is far easier to work with in that situation. In terms of the table structure, the COB files would list the record layout and you would need to use that to parse the data that's returned from the Btrieve API. mirtheil@mirtheil.com
Custom VB and Btrieve development.
Certified Pervasive Developer
Certified Pervasive Technician
 
Here is a sample from their site.

<%@ Language=VBScript %>
<html>
<head>
<meta NAME=&quot;GENERATOR&quot; Content=&quot;Microsoft Visual Studio 6.0&quot;>

<body>

<%

Dim objConn
Set objConn = server.CreateObject(&quot;ADODB.Connection&quot;)
'Use the next line for Pervasive.SQL v7.0 DSN-Less connection
'objConn.ConnectionString = &quot;DRIVER={Pervasive Software ODBC-32};DATAPATH=c:\pvsw\demodata;DDFPATH=c:\pvsw\demodata&quot;
'Use the next line for Pervasive.SQL 2000 DSN-Less Connections:
'objConn.ConnectionString = &quot;Driver={Pervasive ODBC Engine Interface};dbq=Demodata&quot;
'Use the next line for and DSN connection
objConn.ConnectionString = &quot;DSN=Demodata&quot;
objConn.Open

mySQL = &quot;Select * from person&quot;
set rstemp=objConn.Execute(mySQL)
if rstemp.eof then
Response.Write &quot;No records matched<br>&quot;
Response.Write mySQL & &quot;<br>So cannot make table...&quot;
objConn.Close
set objConn=nothing
Response.End
end if
%>
<table border=&quot;1&quot;><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=shownull
end if
if trim(thisfield)=&quot;&quot; then
thisfield=showblank
end if%>
<td valign=&quot;top&quot;><%=thisfield%></td>
<% next %>
</tr>
<%rstemp.movenext
LOOP%>
</table>

<%
rstemp.close
set rstemp=nothing
objConn.Close
set objConn=nothing
%>
</body>
</html>
Gil
 
Thanks grnelson.

Do you know if I can use the same code for btrieve 6.15?

I am looking into something from Classic software. It's a data control for Btrieve 6.15. Has anyone had any experience with it? They say you do not need DDF's or the ODBC driver to use it if you buy the Enterprise Edition.

 
I have not tried it on 6.15. I've used ColdFusion to access a DSN created with the 6.15 Btrieve drivers but I would guess if you make the adjustments to the driver names that it should work. To use any 3-rd party product you will need the DDF files. The DDf files is what tells the ODBC drivers or other products that a field is a string or a numeric or date and so on. Perhaps with their software you define that information on each field that you add to a form but I'm not familure with that product. I've used the ActiveX controls from Pervasive for some time and while they require the DDF files when creating the program you can compile it so that the DDF files are not required for distribution.
Gil
 
I've been trying to use Btrieve ODBC 2.04 with ASP to connect to a Primavera Project Planner database (P3); I've already created the DDF files to connect to it. When I link the P3 tables to an access database everything works fine, but when I try to connect to the P3 tables from ASP I get so many problems, if I try to open the tables using a DSN I get this error:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

And when I try to use an Access database as a middle man(linking the P3 tables to the Access database) and then try to get to the database(Access) I get this error:
Microsoft JET Database Engine error '80004005'

ODBC--connection to 'CRGP' failed.


I also tested this method:
objConn.ConnectionString = &quot;DRIVER={Pervasive Software ODBC-32};DATAPATH=C:\P3WIN\OriginalClient;DDFPATH=C:\P3WIN\OriginalClient&quot;
and I get this error:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Pervasive Software][ODBC Interface][Pervasive Software SQL Engine]General error.

/update_projects.asp, line 33

Please I really need some help.
 
I am also getting this error while accessing p3 files from ASP
Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Pervasive Software][ODBC Interface][Pervasive Software SQL Engine]General error.

/p3test.asp, line 12
can someone help me in solving this...

thanks in advance....

kishore.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top