dbTalk Databases Forums  

DTO and Pervasive 7 sp5

comp.databases.btrieve comp.databases.btrieve


Discuss DTO and Pervasive 7 sp5 in the comp.databases.btrieve forum.



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

Default DTO and Pervasive 7 sp5 - 10-09-2006 , 03:12 PM






Hi all,
I am attempting to use DTO to manipulate version 7 databases.
Psuedocode is like this:

dtoDictionary.Open "ddf_path"

I am running this on the local computer. The local database being
version 7 has no security in use, so no user names or passwords etc.

While attempting that command, I get:
"Database Session could not be started using the given name and
password"

I did try several things including:
dtoDictionary.Open "ddf_path" , "admin_user", "admin_psswd"
dtoDictionary.Open "\\Server\Share\ddf_path" , "admin_user",
"admin_psswd"
dtoDictionary.Open "ddf_path" , "", ""
dtoDictionary.Open "ddf_path" , 0, 0
dtoDictionary.Open "ddf_path" , vbNull, vbNull

Works great on the system where 8.5 is loaded, but not on existing
version 7.
dtoSession seems to work fine, but not the dtoDictionary object.

Thanks for any help!


In case it helps, the reason why I want to use this object is I want to
"clone" some tables using similiar to:

Sub CloneTable(NewTable as dtoTable, SampleTable as dtoTable)

For each Column in SampleTable
NewTable.AddColumn Column
Next
For each Index in SampleTable
NewTable.AddIndex Index
Next

End sub

I tested this and it works well on my devel machine wioth version 8.5,
but having my issue as shown above on version 7.

-Henry


Reply With Quote
  #2  
Old   
Wayne
 
Posts: n/a

Default Re: DTO and Pervasive 7 sp5 - 10-09-2006 , 11:20 PM






Hi,

I know that DTO was released on Pervasive.SQL v2000. I don't think it
was intended for use on v7. I wouldn't be surprised if a few methods
would work, but I don't believe it's officially supported on v7.

Wayne Freeman
www.analyticabiz.com

mehoss ha scritto:

Quote:
Hi all,
I am attempting to use DTO to manipulate version 7 databases.
Psuedocode is like this:

dtoDictionary.Open "ddf_path"

I am running this on the local computer. The local database being
version 7 has no security in use, so no user names or passwords etc.

While attempting that command, I get:
"Database Session could not be started using the given name and
password"

I did try several things including:
dtoDictionary.Open "ddf_path" , "admin_user", "admin_psswd"
dtoDictionary.Open "\\Server\Share\ddf_path" , "admin_user",
"admin_psswd"
dtoDictionary.Open "ddf_path" , "", ""
dtoDictionary.Open "ddf_path" , 0, 0
dtoDictionary.Open "ddf_path" , vbNull, vbNull

Works great on the system where 8.5 is loaded, but not on existing
version 7.
dtoSession seems to work fine, but not the dtoDictionary object.

Thanks for any help!


In case it helps, the reason why I want to use this object is I want to
"clone" some tables using similiar to:

Sub CloneTable(NewTable as dtoTable, SampleTable as dtoTable)

For each Column in SampleTable
NewTable.AddColumn Column
Next
For each Index in SampleTable
NewTable.AddIndex Index
Next

End sub

I tested this and it works well on my devel machine wioth version 8.5,
but having my issue as shown above on version 7.

-Henry


Reply With Quote
  #3  
Old   
Wayne
 
Posts: n/a

Default Re: DTO and Pervasive 7 sp5 - 10-09-2006 , 11:23 PM



Hi again,

I would be remiss if I didn't suggest that your client upgrade.
Pervasive.SQL v7 is getting pretty long in the tooth and v9.5 has much
improved SQL support.

Wayne
Analytica Business Systems
www.analyticabiz.com

mehoss ha scritto:

Quote:
Hi all,
I am attempting to use DTO to manipulate version 7 databases.
Psuedocode is like this:

dtoDictionary.Open "ddf_path"

I am running this on the local computer. The local database being
version 7 has no security in use, so no user names or passwords etc.

While attempting that command, I get:
"Database Session could not be started using the given name and
password"

I did try several things including:
dtoDictionary.Open "ddf_path" , "admin_user", "admin_psswd"
dtoDictionary.Open "\\Server\Share\ddf_path" , "admin_user",
"admin_psswd"
dtoDictionary.Open "ddf_path" , "", ""
dtoDictionary.Open "ddf_path" , 0, 0
dtoDictionary.Open "ddf_path" , vbNull, vbNull

Works great on the system where 8.5 is loaded, but not on existing
version 7.
dtoSession seems to work fine, but not the dtoDictionary object.

Thanks for any help!


In case it helps, the reason why I want to use this object is I want to
"clone" some tables using similiar to:

Sub CloneTable(NewTable as dtoTable, SampleTable as dtoTable)

For each Column in SampleTable
NewTable.AddColumn Column
Next
For each Index in SampleTable
NewTable.AddIndex Index
Next

End sub

I tested this and it works well on my devel machine wioth version 8.5,
but having my issue as shown above on version 7.

-Henry


Reply With Quote
  #4  
Old   
mehoss
 
Posts: n/a

Default Clone Tables Pervasive 7 - 10-10-2006 , 10:58 AM



upgrade? Not gunna happen, waiting for this to all be over in about a
year so we are stuck with version 7 until then.

Anyone know a way to "clone" tables in version 7?
Basically just want to read in an existing table fields and indexes and
clone to new table.
Open to ANY ideas.

thanks,


Reply With Quote
  #5  
Old   
Wayne
 
Posts: n/a

Default Re: Clone Tables Pervasive 7 - 10-10-2006 , 12:56 PM



Sure, use Butil -clone.

Go to a command prompt and enter "butil" and you'll get a syntax list.
Clone is one of the commands.

You can also use the Pervasive.SQL Maintenance Utility. It's
GUI-based. Butil is quicker.

Wayne
Analytica Business Systems
www.analyticabiz.com

mehoss ha scritto:

Quote:
upgrade? Not gunna happen, waiting for this to all be over in about a
year so we are stuck with version 7 until then.

Anyone know a way to "clone" tables in version 7?
Basically just want to read in an existing table fields and indexes and
clone to new table.
Open to ANY ideas.

thanks,


Reply With Quote
  #6  
Old   
Wayne
 
Posts: n/a

Default Re: Clone Tables Pervasive 7 - 10-10-2006 , 01:08 PM



Of course, Butil -clone just clones the data file, no data. If you
also want to clone the table entry in the ddf, that's more involved.
That was a weakness in early versions of the Pervasive.SQL Control
Center.

There is a utility available in the Pervasive Component Zone that might
do what you need. It's called "ActiveX Table Copy". You can find it
here:
http://www.pervasive.com/ComponentZo...+%2F+Utilities

Hope this helps.

Wayne
Analytica Business Systems
www.analyticabiz.com

Wayne ha scritto:

Quote:
Sure, use Butil -clone.

Go to a command prompt and enter "butil" and you'll get a syntax list.
Clone is one of the commands.

You can also use the Pervasive.SQL Maintenance Utility. It's
GUI-based. Butil is quicker.

Wayne
Analytica Business Systems
www.analyticabiz.com

mehoss ha scritto:

upgrade? Not gunna happen, waiting for this to all be over in about a
year so we are stuck with version 7 until then.

Anyone know a way to "clone" tables in version 7?
Basically just want to read in an existing table fields and indexes and
clone to new table.
Open to ANY ideas.

thanks,


Reply With Quote
  #7  
Old   
mehoss
 
Posts: n/a

Default Re: Clone Tables Pervasive 7 - 10-11-2006 , 09:41 AM



I did already try that example "ActiveX Table Copy", it appears that it
suffers from the same ills as the DTO component as they both came out
with the 2K version. The behavour exhibited is everything works well
as long as you are not messing with DDF's. In fact I make good use of
the ActiveX Data Library for read only access on the version 7
databases with excellent results, but have problems with the
manipulation of DDFs. My guess is that new security model has much to
do with it. I was able to clone a V7 table using the activex, but
only when run on my devel machine (8.5 loaded), but then I had to make
a call to object.BTRV(30) (i think that is the syntax...not at my dev
machine) to remove security from the newly created table. All of these
things that I attempted are a bit scary for my production machines
however, so I won't be doing any of these unsupported actions for sure.
It appears that someone else has taken on this task, they will probably
run sqlscope on 100 machines...not the way I would want to do it, but I
guess they have more time than ....??
thanks for your suggesions.


Reply With Quote
  #8  
Old   
Wayne
 
Posts: n/a

Default Re: Clone Tables Pervasive 7 - 10-12-2006 , 10:54 AM



Well, that's too bad about "ActiveX Table Copy". I was hoping that,
based on its upload date (1999) that it was developed for late-v7
rather than early-v2000.

I remember back when the PCC was first released for v7, we had all been
waiting for such a tool, but then, of course, the second thing we
wanted to do was copy a table. No such luck.

But why run sqlscope on 100 machines? Why not just do the
table-cloning work once and distribute the DDFs?

Wayne
Analytica Business Systems
www.analyticabiz.com

mehoss ha scritto:

Quote:
I did already try that example "ActiveX Table Copy", it appears that it
suffers from the same ills as the DTO component as they both came out
with the 2K version. The behavour exhibited is everything works well
as long as you are not messing with DDF's. In fact I make good use of
the ActiveX Data Library for read only access on the version 7
databases with excellent results, but have problems with the
manipulation of DDFs. My guess is that new security model has much to
do with it. I was able to clone a V7 table using the activex, but
only when run on my devel machine (8.5 loaded), but then I had to make
a call to object.BTRV(30) (i think that is the syntax...not at my dev
machine) to remove security from the newly created table. All of these
things that I attempted are a bit scary for my production machines
however, so I won't be doing any of these unsupported actions for sure.
It appears that someone else has taken on this task, they will probably
run sqlscope on 100 machines...not the way I would want to do it, but I
guess they have more time than ....??
thanks for your suggesions.


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

Default Re: Clone Tables Pervasive 7 - 10-12-2006 , 05:16 PM



Here's a question -- do you just need to create new tables?

Why not just build a CREATE TABLE statement instead? Once built, this
can be executed from SQLScope, from the newer PCC, or from ANY
ODBC-based tool. Our own SQLExec can handle firing queries from the
command line, as can Pervasive's PVDDL tool (provided with PSQLv9).
There is also a PVQuery tool that should work on older systems, but I'm
not sure how far back it will go.

Since SQLExec is an ODBC-based tool, it works to PSQL7, but also to
Btrieve 6.15 (with the ODBC drivers or with Scalable SQL 3.01), Oracle,
SQLServer, Sybase, QuickBooks, Excel, and a whole lot more.
Goldstar Software Inc.
Pervasive-based Products, Training & Services
Bill Bach
BillBach (AT) goldstarsoftware (DOT) com
http://www.goldstarsoftware.com
*** Chicago: Pervasive Service & Support Class - 10/2006 ***

mehoss wrote:

Quote:
I did already try that example "ActiveX Table Copy", it appears that
it suffers from the same ills as the DTO component as they both came
out with the 2K version. The behavour exhibited is everything works
well as long as you are not messing with DDF's. In fact I make good
use of the ActiveX Data Library for read only access on the version 7
databases with excellent results, but have problems with the
manipulation of DDFs. My guess is that new security model has much to
do with it. I was able to clone a V7 table using the activex, but
only when run on my devel machine (8.5 loaded), but then I had to make
a call to object.BTRV(30) (i think that is the syntax...not at my dev
machine) to remove security from the newly created table. All of
these things that I attempted are a bit scary for my production
machines however, so I won't be doing any of these unsupported
actions for sure. It appears that someone else has taken on this
task, they will probably run sqlscope on 100 machines...not the way I
would want to do it, but I guess they have more time than ....??
thanks for your suggesions.


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.