dbTalk Databases Forums  

Migration from native Btrieve calls to SQL with ZEOS components

comp.databases.btrieve comp.databases.btrieve


Discuss Migration from native Btrieve calls to SQL with ZEOS components in the comp.databases.btrieve forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Axel Potthoff
 
Posts: n/a

Default Migration from native Btrieve calls to SQL with ZEOS components - 02-25-2008 , 02:48 AM






Hello,

we want to migrate our applications to SQL. Until now we use as a relict
of DOS times native Btrieve calls.

We work in this way now:
* LogIn as Administrator
* Start Pervasive Control-Center
* create an new database
* LogOut as Administrator an LogIn as User
* Work with our application.

This is noch acceptable for our users in two points:
* They have no Administrator rights.
* They don't want to be bored with the Controlcenter.

How can we create and use a dateabase at runtime of our Application.
It can be done easily with Firebird/Interbase by the ZEOS components we
uses.
How can we do this with Pervasive.SQL e.g. via ADO protocol.

Axel

Reply With Quote
  #2  
Old   
Bill Bach
 
Posts: n/a

Default Re: Migration from native Btrieve calls to SQL with ZEOS components - 02-25-2008 , 08:03 AM






Native Btrieve calls are not a relic of days past -- in fact, they
provide an ultra-fast interface directly into a transactional database
that can ALSO be used as a relational database from SQL/ODBC (and ADO).

You should be able to run your old DOS applications directly on any
newer Win32 environment if you are using Pervasive.SQL with no extra
steps.

As for your "new" ADO application -- why are the users creating
databases? The users should be accessing databases created by the
developers and/or database administrator, and they should not be
creating new ones.

Creating a database is an administrative task that does require
administrative rights. As such, even if you used the DTI or DTO
interfaces to create a new database in the envirnment, you would either
need to provide an administrative login inside the application (which
is a security risk), or you'd have to prompt for a login name at the
time the code runs, and users would still need it.


Can you be more specific about your actual versions and provide a
reason why the users need to keep creating new databases?
Goldstar Software Inc.
Pervasive-based Products, Training & Services
Bill Bach
BillBach (AT) goldstarsoftware (DOT) com
http://www.goldstarsoftware.com
*** Chicago: Pervasive Service & Support Class - March 2008 ***


Axel Potthoff wrote:

Quote:
Hello,

we want to migrate our applications to SQL. Until now we use as a
relict of DOS times native Btrieve calls.

We work in this way now:
* LogIn as Administrator
* Start Pervasive Control-Center
* create an new database
* LogOut as Administrator an LogIn as User
* Work with our application.

This is noch acceptable for our users in two points:
* They have no Administrator rights.
* They don't want to be bored with the Controlcenter.

How can we create and use a dateabase at runtime of our Application.
It can be done easily with Firebird/Interbase by the ZEOS components
we uses.
How can we do this with Pervasive.SQL e.g. via ADO protocol.

Axel


--



Reply With Quote
  #3  
Old   
Bill Bach
 
Posts: n/a

Default Re: Migration from native Btrieve calls to SQL with ZEOS components - 02-25-2008 , 08:03 AM



Native Btrieve calls are not a relic of days past -- in fact, they
provide an ultra-fast interface directly into a transactional database
that can ALSO be used as a relational database from SQL/ODBC (and ADO).

You should be able to run your old DOS applications directly on any
newer Win32 environment if you are using Pervasive.SQL with no extra
steps.

As for your "new" ADO application -- why are the users creating
databases? The users should be accessing databases created by the
developers and/or database administrator, and they should not be
creating new ones.

Creating a database is an administrative task that does require
administrative rights. As such, even if you used the DTI or DTO
interfaces to create a new database in the envirnment, you would either
need to provide an administrative login inside the application (which
is a security risk), or you'd have to prompt for a login name at the
time the code runs, and users would still need it.


Can you be more specific about your actual versions and provide a
reason why the users need to keep creating new databases?
Goldstar Software Inc.
Pervasive-based Products, Training & Services
Bill Bach
BillBach (AT) goldstarsoftware (DOT) com
http://www.goldstarsoftware.com
*** Chicago: Pervasive Service & Support Class - March 2008 ***


Axel Potthoff wrote:

Quote:
Hello,

we want to migrate our applications to SQL. Until now we use as a
relict of DOS times native Btrieve calls.

We work in this way now:
* LogIn as Administrator
* Start Pervasive Control-Center
* create an new database
* LogOut as Administrator an LogIn as User
* Work with our application.

This is noch acceptable for our users in two points:
* They have no Administrator rights.
* They don't want to be bored with the Controlcenter.

How can we create and use a dateabase at runtime of our Application.
It can be done easily with Firebird/Interbase by the ZEOS components
we uses.
How can we do this with Pervasive.SQL e.g. via ADO protocol.

Axel


--



Reply With Quote
  #4  
Old   
Bill Bach
 
Posts: n/a

Default Re: Migration from native Btrieve calls to SQL with ZEOS components - 02-25-2008 , 08:03 AM



Native Btrieve calls are not a relic of days past -- in fact, they
provide an ultra-fast interface directly into a transactional database
that can ALSO be used as a relational database from SQL/ODBC (and ADO).

You should be able to run your old DOS applications directly on any
newer Win32 environment if you are using Pervasive.SQL with no extra
steps.

As for your "new" ADO application -- why are the users creating
databases? The users should be accessing databases created by the
developers and/or database administrator, and they should not be
creating new ones.

Creating a database is an administrative task that does require
administrative rights. As such, even if you used the DTI or DTO
interfaces to create a new database in the envirnment, you would either
need to provide an administrative login inside the application (which
is a security risk), or you'd have to prompt for a login name at the
time the code runs, and users would still need it.


Can you be more specific about your actual versions and provide a
reason why the users need to keep creating new databases?
Goldstar Software Inc.
Pervasive-based Products, Training & Services
Bill Bach
BillBach (AT) goldstarsoftware (DOT) com
http://www.goldstarsoftware.com
*** Chicago: Pervasive Service & Support Class - March 2008 ***


Axel Potthoff wrote:

Quote:
Hello,

we want to migrate our applications to SQL. Until now we use as a
relict of DOS times native Btrieve calls.

We work in this way now:
* LogIn as Administrator
* Start Pervasive Control-Center
* create an new database
* LogOut as Administrator an LogIn as User
* Work with our application.

This is noch acceptable for our users in two points:
* They have no Administrator rights.
* They don't want to be bored with the Controlcenter.

How can we create and use a dateabase at runtime of our Application.
It can be done easily with Firebird/Interbase by the ZEOS components
we uses.
How can we do this with Pervasive.SQL e.g. via ADO protocol.

Axel


--



Reply With Quote
  #5  
Old   
Axel Potthoff
 
Posts: n/a

Default Re: Migration from native Btrieve calls to SQL with ZEOS components - 02-25-2008 , 09:48 AM



Bill,

I have to explain my basic problem a little more:
We have no DOS applications any more. We do Btrieve calls in Windows.
We don't use DDF files until now.
We use local workstation engines. Our customers don't like someone,
installing something on their server.
But we want to change to SQL do be more flexible to changes in the
structure.

Bill Bach wrote:
Quote:
...
As for your "new" ADO application -- why are the users creating
databases? The users should be accessing databases created by the
developers and/or database administrator, and they should not be
creating new ones.
We started with Btrieve 5.15.
The users do this since 15 years or more.
They say, "The month is over, let us start with an new data file for
documentation."
They take the data file, put it to a USB stick an read data records at
an offline system.
With native Btrieve this all was no problem. "One file = one table". A
simple call of function 14 and you have an new data file. The structure
is made by our application, but filename and location can be choosen
freely by the user. We have not had any problems in the past.
And that is all what we want.
But now, the controlcenter has to be used. You are right, that is
nothing for the user! And the controlcenter writes something to the
C:\WINDOWS\DBNAMES.CFG and maybe elsewhere before I can connect the
datafiles.

Is there no simpler solution?


Axel


Reply With Quote
  #6  
Old   
Axel Potthoff
 
Posts: n/a

Default Re: Migration from native Btrieve calls to SQL with ZEOS components - 02-25-2008 , 09:48 AM



Bill,

I have to explain my basic problem a little more:
We have no DOS applications any more. We do Btrieve calls in Windows.
We don't use DDF files until now.
We use local workstation engines. Our customers don't like someone,
installing something on their server.
But we want to change to SQL do be more flexible to changes in the
structure.

Bill Bach wrote:
Quote:
...
As for your "new" ADO application -- why are the users creating
databases? The users should be accessing databases created by the
developers and/or database administrator, and they should not be
creating new ones.
We started with Btrieve 5.15.
The users do this since 15 years or more.
They say, "The month is over, let us start with an new data file for
documentation."
They take the data file, put it to a USB stick an read data records at
an offline system.
With native Btrieve this all was no problem. "One file = one table". A
simple call of function 14 and you have an new data file. The structure
is made by our application, but filename and location can be choosen
freely by the user. We have not had any problems in the past.
And that is all what we want.
But now, the controlcenter has to be used. You are right, that is
nothing for the user! And the controlcenter writes something to the
C:\WINDOWS\DBNAMES.CFG and maybe elsewhere before I can connect the
datafiles.

Is there no simpler solution?


Axel


Reply With Quote
  #7  
Old   
Axel Potthoff
 
Posts: n/a

Default Re: Migration from native Btrieve calls to SQL with ZEOS components - 02-25-2008 , 09:48 AM



Bill,

I have to explain my basic problem a little more:
We have no DOS applications any more. We do Btrieve calls in Windows.
We don't use DDF files until now.
We use local workstation engines. Our customers don't like someone,
installing something on their server.
But we want to change to SQL do be more flexible to changes in the
structure.

Bill Bach wrote:
Quote:
...
As for your "new" ADO application -- why are the users creating
databases? The users should be accessing databases created by the
developers and/or database administrator, and they should not be
creating new ones.
We started with Btrieve 5.15.
The users do this since 15 years or more.
They say, "The month is over, let us start with an new data file for
documentation."
They take the data file, put it to a USB stick an read data records at
an offline system.
With native Btrieve this all was no problem. "One file = one table". A
simple call of function 14 and you have an new data file. The structure
is made by our application, but filename and location can be choosen
freely by the user. We have not had any problems in the past.
And that is all what we want.
But now, the controlcenter has to be used. You are right, that is
nothing for the user! And the controlcenter writes something to the
C:\WINDOWS\DBNAMES.CFG and maybe elsewhere before I can connect the
datafiles.

Is there no simpler solution?


Axel


Reply With Quote
  #8  
Old   
Bill Bach
 
Posts: n/a

Default Re: Migration from native Btrieve calls to SQL with ZEOS components - 02-25-2008 , 02:21 PM



This is a very unusual approach. What kind of application is this for?
I just cannot fathom why a new database would be needed every month.
This makes accessing history a LOT more difficult than it should be,
and users may be doing this simple because they do not know any better
way

What exact database version are you using? Obviously it is PSQL2000i
or newer, since the PCC was introduced in that version, but it could be
PSQLV8, PSQLv9, or PSQLv10, and the capabilities may vary between
versions.

As for not wanting software on the server, then it is clear that your
customers also do not understand the benefits of client/server
capabilities, and the stability and performance gains that it offers on
any multi-user system.

If they really want to continue (and I recommend against it), then
you'll have to have some tricks up your sleeve. You can use the modern
Distributed Tuning Objects (DTO) calls to create the database for your
user, using something like this (copied from the manual):

Dim result As dtoResult
Dim database As DtoDatabase
Set database = New DtoDatabase
' Set properties for new database
database.Name = "MYDATABASE"
database.DdfPath = "C:\test"
database.DataPath = "C:\test"
database.Flags = dtoDbFlagCreateDDF + dtoDbFlagRI
result = my_session.Databases.Add(database)
If NOT result = Dto_Success Then
MsgBox "Error"+ Session.Error(result)
End If


Of course, you must also connect to the server and provide a valid
username/password before running this script. If you are ONLY using
Workgroup Engines, though, then you do NOT need a password, as the WGE
does NOT implement database security at all. In short, you can provide
"Administrator" and no password, and a WGE will allow you in.

See the DTO documentation (provided with the product) for more detailed
information. On older systems, you may need an additional DTO
installation, although PSQLv10 systems should be fine...
Goldstar Software Inc.
Pervasive-based Products, Training & Services
Bill Bach
BillBach (AT) goldstarsoftware (DOT) com
http://www.goldstarsoftware.com
*** Chicago: Pervasive Service & Support Class - March 2008 ***


Axel Potthoff wrote:

Quote:
Bill,

I have to explain my basic problem a little more:
We have no DOS applications any more. We do Btrieve calls in Windows.
We don't use DDF files until now.
We use local workstation engines. Our customers don't like someone,
installing something on their server.
But we want to change to SQL do be more flexible to changes in the
structure.

Bill Bach wrote:
...
As for your "new" ADO application -- why are the users creating
databases? The users should be accessing databases created by the
developers and/or database administrator, and they should not be
creating new ones.

We started with Btrieve 5.15.
The users do this since 15 years or more.
They say, "The month is over, let us start with an new data file for
documentation."
They take the data file, put it to a USB stick an read data records at
an offline system.
With native Btrieve this all was no problem. "One file = one table". A
simple call of function 14 and you have an new data file. The
structure is made by our application, but filename and location can
be choosen freely by the user. We have not had any problems in the
past. And that is all what we want.
But now, the controlcenter has to be used. You are right, that is
nothing for the user! And the controlcenter writes something to the
C:\WINDOWS\DBNAMES.CFG and maybe elsewhere before I can connect the
datafiles.

Is there no simpler solution?


Axel


--



Reply With Quote
  #9  
Old   
Bill Bach
 
Posts: n/a

Default Re: Migration from native Btrieve calls to SQL with ZEOS components - 02-25-2008 , 02:21 PM



This is a very unusual approach. What kind of application is this for?
I just cannot fathom why a new database would be needed every month.
This makes accessing history a LOT more difficult than it should be,
and users may be doing this simple because they do not know any better
way

What exact database version are you using? Obviously it is PSQL2000i
or newer, since the PCC was introduced in that version, but it could be
PSQLV8, PSQLv9, or PSQLv10, and the capabilities may vary between
versions.

As for not wanting software on the server, then it is clear that your
customers also do not understand the benefits of client/server
capabilities, and the stability and performance gains that it offers on
any multi-user system.

If they really want to continue (and I recommend against it), then
you'll have to have some tricks up your sleeve. You can use the modern
Distributed Tuning Objects (DTO) calls to create the database for your
user, using something like this (copied from the manual):

Dim result As dtoResult
Dim database As DtoDatabase
Set database = New DtoDatabase
' Set properties for new database
database.Name = "MYDATABASE"
database.DdfPath = "C:\test"
database.DataPath = "C:\test"
database.Flags = dtoDbFlagCreateDDF + dtoDbFlagRI
result = my_session.Databases.Add(database)
If NOT result = Dto_Success Then
MsgBox "Error"+ Session.Error(result)
End If


Of course, you must also connect to the server and provide a valid
username/password before running this script. If you are ONLY using
Workgroup Engines, though, then you do NOT need a password, as the WGE
does NOT implement database security at all. In short, you can provide
"Administrator" and no password, and a WGE will allow you in.

See the DTO documentation (provided with the product) for more detailed
information. On older systems, you may need an additional DTO
installation, although PSQLv10 systems should be fine...
Goldstar Software Inc.
Pervasive-based Products, Training & Services
Bill Bach
BillBach (AT) goldstarsoftware (DOT) com
http://www.goldstarsoftware.com
*** Chicago: Pervasive Service & Support Class - March 2008 ***


Axel Potthoff wrote:

Quote:
Bill,

I have to explain my basic problem a little more:
We have no DOS applications any more. We do Btrieve calls in Windows.
We don't use DDF files until now.
We use local workstation engines. Our customers don't like someone,
installing something on their server.
But we want to change to SQL do be more flexible to changes in the
structure.

Bill Bach wrote:
...
As for your "new" ADO application -- why are the users creating
databases? The users should be accessing databases created by the
developers and/or database administrator, and they should not be
creating new ones.

We started with Btrieve 5.15.
The users do this since 15 years or more.
They say, "The month is over, let us start with an new data file for
documentation."
They take the data file, put it to a USB stick an read data records at
an offline system.
With native Btrieve this all was no problem. "One file = one table". A
simple call of function 14 and you have an new data file. The
structure is made by our application, but filename and location can
be choosen freely by the user. We have not had any problems in the
past. And that is all what we want.
But now, the controlcenter has to be used. You are right, that is
nothing for the user! And the controlcenter writes something to the
C:\WINDOWS\DBNAMES.CFG and maybe elsewhere before I can connect the
datafiles.

Is there no simpler solution?


Axel


--



Reply With Quote
  #10  
Old   
Bill Bach
 
Posts: n/a

Default Re: Migration from native Btrieve calls to SQL with ZEOS components - 02-25-2008 , 02:21 PM



This is a very unusual approach. What kind of application is this for?
I just cannot fathom why a new database would be needed every month.
This makes accessing history a LOT more difficult than it should be,
and users may be doing this simple because they do not know any better
way

What exact database version are you using? Obviously it is PSQL2000i
or newer, since the PCC was introduced in that version, but it could be
PSQLV8, PSQLv9, or PSQLv10, and the capabilities may vary between
versions.

As for not wanting software on the server, then it is clear that your
customers also do not understand the benefits of client/server
capabilities, and the stability and performance gains that it offers on
any multi-user system.

If they really want to continue (and I recommend against it), then
you'll have to have some tricks up your sleeve. You can use the modern
Distributed Tuning Objects (DTO) calls to create the database for your
user, using something like this (copied from the manual):

Dim result As dtoResult
Dim database As DtoDatabase
Set database = New DtoDatabase
' Set properties for new database
database.Name = "MYDATABASE"
database.DdfPath = "C:\test"
database.DataPath = "C:\test"
database.Flags = dtoDbFlagCreateDDF + dtoDbFlagRI
result = my_session.Databases.Add(database)
If NOT result = Dto_Success Then
MsgBox "Error"+ Session.Error(result)
End If


Of course, you must also connect to the server and provide a valid
username/password before running this script. If you are ONLY using
Workgroup Engines, though, then you do NOT need a password, as the WGE
does NOT implement database security at all. In short, you can provide
"Administrator" and no password, and a WGE will allow you in.

See the DTO documentation (provided with the product) for more detailed
information. On older systems, you may need an additional DTO
installation, although PSQLv10 systems should be fine...
Goldstar Software Inc.
Pervasive-based Products, Training & Services
Bill Bach
BillBach (AT) goldstarsoftware (DOT) com
http://www.goldstarsoftware.com
*** Chicago: Pervasive Service & Support Class - March 2008 ***


Axel Potthoff wrote:

Quote:
Bill,

I have to explain my basic problem a little more:
We have no DOS applications any more. We do Btrieve calls in Windows.
We don't use DDF files until now.
We use local workstation engines. Our customers don't like someone,
installing something on their server.
But we want to change to SQL do be more flexible to changes in the
structure.

Bill Bach wrote:
...
As for your "new" ADO application -- why are the users creating
databases? The users should be accessing databases created by the
developers and/or database administrator, and they should not be
creating new ones.

We started with Btrieve 5.15.
The users do this since 15 years or more.
They say, "The month is over, let us start with an new data file for
documentation."
They take the data file, put it to a USB stick an read data records at
an offline system.
With native Btrieve this all was no problem. "One file = one table". A
simple call of function 14 and you have an new data file. The
structure is made by our application, but filename and location can
be choosen freely by the user. We have not had any problems in the
past. And that is all what we want.
But now, the controlcenter has to be used. You are right, that is
nothing for the user! And the controlcenter writes something to the
C:\WINDOWS\DBNAMES.CFG and maybe elsewhere before I can connect the
datafiles.

Is there no simpler solution?


Axel


--



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.