Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #1565 > unrolled thread
| Started by | Krystian <softb@softb.pl> |
|---|---|
| First post | 2011-06-29 11:53 -0700 |
| Last post | 2011-06-30 13:52 +0200 |
| Articles | 7 — 5 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
Open a database on a location as \\Comp\drive\directory\file Krystian <softb@softb.pl> - 2011-06-29 11:53 -0700
Re: Open a database on a location as \\Comp\drive\directory\file John Martens <adsl672100@tiscali.nl> - 2011-06-29 21:51 +0200
Re: Open a database on a location as \\Comp\drive\directory\file "Paul D B" <polleke@NOMORESPAMhnt.be> - 2011-06-30 14:02 +0200
Re: Open a database on a location as \\Comp\drive\directory\file John Martens <adsl672100@tiscali.nl> - 2011-06-30 18:43 +0200
Re: Open a database on a location as \\Comp\drive\directory\file "Jamal" <vodotnet_nospam@yahoo.com> - 2011-06-29 17:49 -0400
Re: Open a database on a location as \\Comp\drive\directory\file "Stephen Quinn" <stevejqNO@bigpondSPAM.net.au> - 2011-06-30 11:02 +1000
Re: Open a database on a location as \\Comp\drive\directory\file "Paul D B" <polleke@NOMORESPAMhnt.be> - 2011-06-30 13:52 +0200
| From | Krystian <softb@softb.pl> |
|---|---|
| Date | 2011-06-29 11:53 -0700 |
| Subject | Open a database on a location as \\Comp\drive\directory\file |
| Message-ID | <946652f5-9f03-4bb1-af9e-9c45568c424b@p13g2000yqh.googlegroups.com> |
Hi All
Is it possible to open a dbserver on such location ?
When I try to use dbserver{'\\Comp\drive\directory\file'} an error
occurs in an init method.
What should I set in source to be able to maintain dbf's and indexes
in this way ?
Thanks
Krystian
[toc] | [next] | [standalone]
| From | John Martens <adsl672100@tiscali.nl> |
|---|---|
| Date | 2011-06-29 21:51 +0200 |
| Message-ID | <4e0b8237$0$30703$5fc3050@news.tiscali.nl> |
| In reply to | #1565 |
I think your code should work. What is the error in the Init ?
You could also try:
DirChange(\\Comp\drive\directory\)
oMyServer := dbserver{'file.dbf'}
DirChange(cOldDir)
or
DirChange(\\Comp\drive\directory\)
oMyServer := odbMyOnwServerClass{}
DirChange(cOldDir)
Cheers,
John
Op 29-6-2011 20:53, Krystian schreef:
> Hi All
>
> Is it possible to open a dbserver on such location ?
> When I try to use dbserver{'\\Comp\drive\directory\file'} an error
> occurs in an init method.
> What should I set in source to be able to maintain dbf's and indexes
> in this way ?
>
> Thanks
> Krystian
[toc] | [prev] | [next] | [standalone]
| From | "Paul D B" <polleke@NOMORESPAMhnt.be> |
|---|---|
| Date | 2011-06-30 14:02 +0200 |
| Message-ID | <4e0c65e9$0$14248$ba620e4c@news.skynet.be> |
| In reply to | #1566 |
John, I would never use Dirchange in that way.
It is meant to change the current Windows directory. And any running
Windows application on your PC might change it at anytime (e.g. use a File,
Open dialog somewhere), or more important: might need/use it while your
VO-program is changing it.
The example you give will need at least 4 lines of code because you will
have to retrieve the Curdir() first in order to restore it after opening the
DBserver.
I think it is a bit shorter to do:
dbserver{'\\Comp\drive\directory\file.dbf'}
OR
set the default path when starting your application
Paul
Paul
"John Martens" schreef in bericht
news:4e0b8237$0$30703$5fc3050@news.tiscali.nl...
I think your code should work. What is the error in the Init ?
You could also try:
DirChange(\\Comp\drive\directory\)
oMyServer := dbserver{'file.dbf'}
DirChange(cOldDir)
or
DirChange(\\Comp\drive\directory\)
oMyServer := odbMyOnwServerClass{}
DirChange(cOldDir)
Cheers,
John
Op 29-6-2011 20:53, Krystian schreef:
> Hi All
>
> Is it possible to open a dbserver on such location ?
> When I try to use dbserver{'\\Comp\drive\directory\file'} an error
> occurs in an init method.
> What should I set in source to be able to maintain dbf's and indexes
> in this way ?
>
> Thanks
> Krystian
[toc] | [prev] | [next] | [standalone]
| From | John Martens <adsl672100@tiscali.nl> |
|---|---|
| Date | 2011-06-30 18:43 +0200 |
| Message-ID | <4e0ca79c$0$30703$5fc3050@news.tiscali.nl> |
| In reply to | #1576 |
Paul,
Het said that dbserver{'\\Comp\drive\directory\file.dbf'} did not work
on the system.
I'm using the DirChange in the case of opening a dbServer object
(together with index files). Changing back the dir to the old value just
after opening never gave me problems.
Cheers,
John
Op 30-6-2011 14:02, Paul D B schreef:
> John, I would never use Dirchange in that way.
> It is meant to change the current Windows directory. And any running
> Windows application on your PC might change it at anytime (e.g. use a
> File, Open dialog somewhere), or more important: might need/use it while
> your VO-program is changing it.
>
> The example you give will need at least 4 lines of code because you will
> have to retrieve the Curdir() first in order to restore it after opening
> the DBserver.
> I think it is a bit shorter to do:
> dbserver{'\\Comp\drive\directory\file.dbf'}
>
> OR
>
> set the default path when starting your application
>
>
> Paul
>
>
>
> Paul
> "John Martens" schreef in bericht
> news:4e0b8237$0$30703$5fc3050@news.tiscali.nl...
>
> I think your code should work. What is the error in the Init ?
> You could also try:
>
> DirChange(\\Comp\drive\directory\)
> oMyServer := dbserver{'file.dbf'}
> DirChange(cOldDir)
>
> or
>
> DirChange(\\Comp\drive\directory\)
> oMyServer := odbMyOnwServerClass{}
> DirChange(cOldDir)
>
> Cheers,
> John
>
>
>
> Op 29-6-2011 20:53, Krystian schreef:
>> Hi All
>>
>> Is it possible to open a dbserver on such location ?
>> When I try to use dbserver{'\\Comp\drive\directory\file'} an error
>> occurs in an init method.
>> What should I set in source to be able to maintain dbf's and indexes
>> in this way ?
>>
>> Thanks
>> Krystian
>
[toc] | [prev] | [next] | [standalone]
| From | "Jamal" <vodotnet_nospam@yahoo.com> |
|---|---|
| Date | 2011-06-29 17:49 -0400 |
| Message-ID | <iug6ls$f32$1@dont-email.me> |
| In reply to | #1565 |
Krystian,
What error are you getting?
Anyway:
1. Use SetDefault(cYourDataPath) and SetPath(cYourDataPath) to the UNC
shared folder you specified.
2. Make sure you set the sharing and security permission to full control.
Jamal
"Krystian" wrote in message
news:946652f5-9f03-4bb1-af9e-9c45568c424b@p13g2000yqh.googlegroups.com...
Hi All
Is it possible to open a dbserver on such location ?
When I try to use dbserver{'\\Comp\drive\directory\file'} an error
occurs in an init method.
What should I set in source to be able to maintain dbf's and indexes
in this way ?
Thanks
Krystian
[toc] | [prev] | [next] | [standalone]
| From | "Stephen Quinn" <stevejqNO@bigpondSPAM.net.au> |
|---|---|
| Date | 2011-06-30 11:02 +1000 |
| Message-ID | <7WPOp.7602$CS3.572@viwinnwfe01.internal.bigpond.com> |
| In reply to | #1565 |
Krystian
IIRC DBFileSpec{} (and FileSpec{}) doesn't handle UNC at all.
CYA
Steve
[toc] | [prev] | [next] | [standalone]
| From | "Paul D B" <polleke@NOMORESPAMhnt.be> |
|---|---|
| Date | 2011-06-30 13:52 +0200 |
| Message-ID | <4e0c6370$0$14261$ba620e4c@news.skynet.be> |
| In reply to | #1565 |
Hi,
- I recommend doing a Setdefault() at application start, to set the default
directory where your data resides (use a trailing backslash in your path
e.g. '\\comp\drive\directory\')
- if not possible (because your data resides in different directories),
always use the full path in the dbserver instantation (as you did ...)
- for UNC paths, it prefer mapping them to a network drive letter, gives
less problems.
- But it should work with \\ paths too, I'm using it every day.
So what is the error you get?
Paul
"Krystian" schreef in bericht
news:946652f5-9f03-4bb1-af9e-9c45568c424b@p13g2000yqh.googlegroups.com...
Hi All
Is it possible to open a dbserver on such location ?
When I try to use dbserver{'\\Comp\drive\directory\file'} an error
occurs in an init method.
What should I set in source to be able to maintain dbf's and indexes
in this way ?
Thanks
Krystian
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web