Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #11938 > unrolled thread

OK, I'm sorry, but what am I doing wrong/missing?

Started byJeff Rollo <jrollo64@gmail.com>
First post2018-09-17 23:48 -0700
Last post2018-09-19 05:24 -0700
Articles 20 on this page of 24 — 10 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  OK, I'm sorry, but what am I doing wrong/missing? Jeff Rollo <jrollo64@gmail.com> - 2018-09-17 23:48 -0700
    Re: OK, I'm sorry, but what am I doing wrong/missing? Stefano Costagli <stea@libero.it> - 2018-09-18 09:34 +0200
      Re: OK, I'm sorry, but what am I doing wrong/missing? Jeff Rollo <jrollo64@gmail.com> - 2018-09-18 00:58 -0700
        Re: OK, I'm sorry, but what am I doing wrong/missing? Robert van der Hulst <rjvanderhulst@gmail.com> - 2018-09-18 01:54 -0700
          Re: OK, I'm sorry, but what am I doing wrong/missing? Jeff Rollo <jrollo64@gmail.com> - 2018-09-18 02:07 -0700
            Re: OK, I'm sorry, but what am I doing wrong/missing? Stefano Costagli <stea@libero.it> - 2018-09-18 12:07 +0200
            Re: OK, I'm sorry, but what am I doing wrong/missing? Robert van der Hulst <rjvanderhulst@gmail.com> - 2018-09-18 03:10 -0700
              Re: OK, I'm sorry, but what am I doing wrong/missing? Franz Rachbauer <office@rachbauer.org> - 2018-09-18 12:34 +0200
                Re: OK, I'm sorry, but what am I doing wrong/missing? Jeff Rollo <jrollo64@gmail.com> - 2018-09-18 04:23 -0700
                  Re: OK, I'm sorry, but what am I doing wrong/missing? Mathias <mathias.hakansson@consultec.se> - 2018-09-18 04:57 -0700
                Re: OK, I'm sorry, but what am I doing wrong/missing? Jeff Rollo <jrollo64@gmail.com> - 2018-09-18 04:27 -0700
                  Re: OK, I'm sorry, but what am I doing wrong/missing? Franz Rachbauer <office@rachbauer.org> - 2018-09-18 14:00 +0200
                    Re: OK, I'm sorry, but what am I doing wrong/missing? Jeff Rollo <jrollo64@gmail.com> - 2018-09-18 05:05 -0700
                      Re: OK, I'm sorry, but what am I doing wrong/missing? Jeff Rollo <jrollo64@gmail.com> - 2018-09-18 05:06 -0700
                        Re: OK, I'm sorry, but what am I doing wrong/missing? Leo_Bond <l.bond@bk.ru> - 2018-09-18 05:37 -0700
                      Re: OK, I'm sorry, but what am I doing wrong/missing? "Wolfgang Riedmann" <wriedmann@gmail.com> - 2018-09-18 16:18 +0200
                  Re: OK, I'm sorry, but what am I doing wrong/missing? dlzc <dlzc1@cox.net> - 2018-09-18 06:48 -0700
    Re: OK, I'm sorry, but what am I doing wrong/missing? Mathias <mathias.hakansson@consultec.se> - 2018-09-19 04:43 -0700
      Re: OK, I'm sorry, but what am I doing wrong/missing? Mathias <mathias.hakansson@consultec.se> - 2018-09-19 05:03 -0700
      Re: OK, I'm sorry, but what am I doing wrong/missing? Jeff Rollo <jrollo64@gmail.com> - 2018-09-19 05:20 -0700
        Re: OK, I'm sorry, but what am I doing wrong/missing? "Jamal" <noooospam@example.com> - 2018-09-19 13:36 -0400
          Re: OK, I'm sorry, but what am I doing wrong/missing? Jeff Rollo <jrollo64@gmail.com> - 2018-09-19 15:42 -0700
        Re: OK, I'm sorry, but what am I doing wrong/missing? Mathias <mathias.hakansson@consultec.se> - 2018-09-20 02:46 -0700
    Re: OK, I'm sorry, but what am I doing wrong/missing? Sherlock <sherlock@sherlock.com.au> - 2018-09-19 05:24 -0700

Page 1 of 2  [1] 2  Next page →


#11938 — OK, I'm sorry, but what am I doing wrong/missing?

FromJeff Rollo <jrollo64@gmail.com>
Date2018-09-17 23:48 -0700
SubjectOK, I'm sorry, but what am I doing wrong/missing?
Message-ID<54797b21-7920-4c52-9ff9-9f886bbdcd36@googlegroups.com>
In my start() Method for my app I have the following code: 

method Start() class App
	local oMainWindow as TopAppWindow
	LOCAL oServer
	local aDBF, aDBF2, aDBF3 as array
	local oFileSpec
//	Local oDB as DBFileSpec
	local n := 0  
	request dbfcdx
	SetPath(CurDir())
  	self:Initialize()
   Enable3dControls()
	oMainWindow := TopAppWindow{self}
	oMainWindow:Show(SHOWZOOMED)
	oMainWindow:Caption := "Business Manager v1.0" 
	RddSetDefault("DBFCDX")
   SetExclusive(FALSE)
   SetDeleted(true) 
   oMainWindow:Icon := BMICON{}
	oMainWindow:IconSm := BMICON{} 
   SetEpoch(2000)
   SetPath(CurDir())
   If File(CurDir() + "client.dbf") == .F.
//		oDB := DbFileSpec{}
		aDBF := {}
		AAdd(aDBF, {"ClCode", "C", 10, 0})
		AAdd(aDBF, {"ClName", "C", 100, 0})
		AAdd(aDBF, {"ClAdd1", "C", 100, 0})   
		AAdd(aDBF, {"ClAdd2", "C", 100, 0})
		AAdd(aDBF, {"ClState", "C", 3, 0})
		AAdd(aDBF, {"ClSuburb", "C", 50, 0}) 
		AAdd(aDBF, {"ClPhone", "N", 10, 0})
		AAdd(aDBF, {"ClPcode", "N", 4, 0})
		AAdd(aDBF, {"ClABN", "C", 20, 0})
		AAdd(aDBF, {"ClEmail", "C", 100, 0})
		AAdd(aDBF, {"ClComments", "M", 10, 0})
		DBCREATE("Client.dbf", aDBF, "DBFCDX")
//	   oDB:Create(CurDir(), aDBF, "DBFCDX")
	   oServer := CLIENT{self}

	   oServer:CreateIndex("Client", "CLCode",,.T.)
	   oServer:CreateOrder("CLName", "Client", "ClName")
	   oServer:CreateOrder("ClState", "Client", "ClState")
	   oServer:CreateOrder("CLCodeName", "Client", (AllTrim(CLIENT->ClCode) + " " + AllTrim(CLIENT->ClName)))
	   oServer:CreateOrder("CLPcode", "Client", "ClPCode")
	   oServer:Close()
  	ENDIF
 

Try as I might, the files are not being created. There's no runtime or compiler errors to give me any clues, I've been all over Google, the printed Manual, the online manual and this Group, and still cannot work out where I'm going wrong.

[toc] | [next] | [standalone]


#11939

FromStefano Costagli <stea@libero.it>
Date2018-09-18 09:34 +0200
Message-ID<pnq9pt$1b0a$1@gioia.aioe.org>
In reply to#11938
Jeff,

CurDir( ) doesn't have the final backslash "\", so when you check the 
File(CurDir() + "client.dbf") it returns 
"c:\YourCurrentDirectoryclient.dbf".

Can I suggest to put in local var, eg.:
LOCAL cCurDir as STRING
LOCAL cDBFile as STRING

cCurDir := CurDir()
cDBFile := cCurDir + "\" + "client.dbf"

If File( cDBFile ) == .F.
...
Endif

less rendundacy, cleaner code, easy debugging

cheers
Stefano

On 18-Sep-18 8:48 AM, Jeff Rollo wrote:
> In my start() Method for my app I have the following code:
> 
> method Start() class App
> 	local oMainWindow as TopAppWindow
> 	LOCAL oServer
> 	local aDBF, aDBF2, aDBF3 as array
> 	local oFileSpec
> //	Local oDB as DBFileSpec
> 	local n := 0
> 	request dbfcdx
> 	SetPath(CurDir())
>    	self:Initialize()
>     Enable3dControls()
> 	oMainWindow := TopAppWindow{self}
> 	oMainWindow:Show(SHOWZOOMED)
> 	oMainWindow:Caption := "Business Manager v1.0"
> 	RddSetDefault("DBFCDX")
>     SetExclusive(FALSE)
>     SetDeleted(true)
>     oMainWindow:Icon := BMICON{}
> 	oMainWindow:IconSm := BMICON{}
>     SetEpoch(2000)
>     SetPath(CurDir())
>     If File(CurDir() + "client.dbf") == .F.
> //		oDB := DbFileSpec{}
> 		aDBF := {}
> 		AAdd(aDBF, {"ClCode", "C", 10, 0})
> 		AAdd(aDBF, {"ClName", "C", 100, 0})
> 		AAdd(aDBF, {"ClAdd1", "C", 100, 0})
> 		AAdd(aDBF, {"ClAdd2", "C", 100, 0})
> 		AAdd(aDBF, {"ClState", "C", 3, 0})
> 		AAdd(aDBF, {"ClSuburb", "C", 50, 0})
> 		AAdd(aDBF, {"ClPhone", "N", 10, 0})
> 		AAdd(aDBF, {"ClPcode", "N", 4, 0})
> 		AAdd(aDBF, {"ClABN", "C", 20, 0})
> 		AAdd(aDBF, {"ClEmail", "C", 100, 0})
> 		AAdd(aDBF, {"ClComments", "M", 10, 0})
> 		DBCREATE("Client.dbf", aDBF, "DBFCDX")
> //	   oDB:Create(CurDir(), aDBF, "DBFCDX")
> 	   oServer := CLIENT{self}
> 
> 	   oServer:CreateIndex("Client", "CLCode",,.T.)
> 	   oServer:CreateOrder("CLName", "Client", "ClName")
> 	   oServer:CreateOrder("ClState", "Client", "ClState")
> 	   oServer:CreateOrder("CLCodeName", "Client", (AllTrim(CLIENT->ClCode) + " " + AllTrim(CLIENT->ClName)))
> 	   oServer:CreateOrder("CLPcode", "Client", "ClPCode")
> 	   oServer:Close()
>    	ENDIF
>   
> 
> Try as I might, the files are not being created. There's no runtime or compiler errors to give me any clues, I've been all over Google, the printed Manual, the online manual and this Group, and still cannot work out where I'm going wrong.
> 

[toc] | [prev] | [next] | [standalone]


#11940

FromJeff Rollo <jrollo64@gmail.com>
Date2018-09-18 00:58 -0700
Message-ID<25747c8d-b643-4d71-b2ff-d08b0eef8120@googlegroups.com>
In reply to#11939
Thanks Stefano I've made those changes as you suggested, but unfortunately, it still doesn't create the files...

[toc] | [prev] | [next] | [standalone]


#11941

FromRobert van der Hulst <rjvanderhulst@gmail.com>
Date2018-09-18 01:54 -0700
Message-ID<93930f24-4e9a-4b0c-9ea7-58b1fdde8bad@googlegroups.com>
In reply to#11940
Jeff,

- Each of the functions and methods DbCreate, CreateOrder etc. return a logical value indicating success or failure. Please check these values, so you know where it goes wrong.
- Are the RDD files (DBFCDX.RDD, _DBFCDX.RDD, CAVODBF.RDD) in the current folder or in the path ?

Robert

[toc] | [prev] | [next] | [standalone]


#11942

FromJeff Rollo <jrollo64@gmail.com>
Date2018-09-18 02:07 -0700
Message-ID<9366718d-1756-4f17-a5d9-8bf0aca119ed@googlegroups.com>
In reply to#11941
Hi Robert,

Yes all three of those files are in the programs install directory.

The following vode produced these results, but still no file.

		AAdd(aDBF, {"ClCode", "C", 10, 0})
		AAdd(aDBF, {"ClName", "C", 100, 0})
		AAdd(aDBF, {"ClAdd1", "C", 100, 0})   
		AAdd(aDBF, {"ClAdd2", "C", 100, 0})
		AAdd(aDBF, {"ClState", "C", 3, 0})
		AAdd(aDBF, {"ClSuburb", "C", 50, 0}) 
		AAdd(aDBF, {"ClPhone", "N", 10, 0})
		AAdd(aDBF, {"ClPcode", "N", 4, 0})
		AAdd(aDBF, {"ClABN", "C", 20, 0})
		AAdd(aDBF, {"ClEmail", "C", 100, 0})
		AAdd(aDBF, {"ClComments", "M", 10, 0})
??		DBCREATE("Client.dbf", aDBF, "DBFCDX")    //T
//	   oDB:Create(CurDir(), aDBF, "DBFCDX")
	   oServer := CLIENT{self}

??	   oServer:CreateIndex("Client", "CLCode",,.T.)          //T
??	   oServer:CreateOrder("CLName", "Client", "ClName")     //T
??	   oServer:CreateOrder("ClState", "Client", "ClState")   //T
??	   oServer:CreateOrder("CLCodeName", "Client", (AllTrim(CLIENT->ClCode) + " " + AllTrim(CLIENT->ClName)))     //F
??	   oServer:CreateOrder("CLPcode", "Client", "ClPCode")   //T
	 

I have noticed that CurDir is NOT putting the c:\ in front of the path, could that be it?

[toc] | [prev] | [next] | [standalone]


#11943

FromStefano Costagli <stea@libero.it>
Date2018-09-18 12:07 +0200
Message-ID<pnqiok$1r35$1@gioia.aioe.org>
In reply to#11942
Jeff,

try this:
LOCAL cCurDir AS STRING
LOCAL cDBFile AS STRING

cCurDir := CurDrive() + ":\" + CurDir( ) + "\"
cDBFile := cCurDir + "client.dbf"

...

hth
Stefano


On 18-Sep-18 11:07 AM, Jeff Rollo wrote:
> Hi Robert,
> 
> Yes all three of those files are in the programs install directory.
> 
> The following vode produced these results, but still no file.
> 
> 		AAdd(aDBF, {"ClCode", "C", 10, 0})
> 		AAdd(aDBF, {"ClName", "C", 100, 0})
> 		AAdd(aDBF, {"ClAdd1", "C", 100, 0})
> 		AAdd(aDBF, {"ClAdd2", "C", 100, 0})
> 		AAdd(aDBF, {"ClState", "C", 3, 0})
> 		AAdd(aDBF, {"ClSuburb", "C", 50, 0})
> 		AAdd(aDBF, {"ClPhone", "N", 10, 0})
> 		AAdd(aDBF, {"ClPcode", "N", 4, 0})
> 		AAdd(aDBF, {"ClABN", "C", 20, 0})
> 		AAdd(aDBF, {"ClEmail", "C", 100, 0})
> 		AAdd(aDBF, {"ClComments", "M", 10, 0})
> ??		DBCREATE("Client.dbf", aDBF, "DBFCDX")    //T
> //	   oDB:Create(CurDir(), aDBF, "DBFCDX")
> 	   oServer := CLIENT{self}
> 
> ??	   oServer:CreateIndex("Client", "CLCode",,.T.)          //T
> ??	   oServer:CreateOrder("CLName", "Client", "ClName")     //T
> ??	   oServer:CreateOrder("ClState", "Client", "ClState")   //T
> ??	   oServer:CreateOrder("CLCodeName", "Client", (AllTrim(CLIENT->ClCode) + " " + AllTrim(CLIENT->ClName)))     //F
> ??	   oServer:CreateOrder("CLPcode", "Client", "ClPCode")   //T
> 	
> 
> I have noticed that CurDir is NOT putting the c:\ in front of the path, could that be it?
> 

[toc] | [prev] | [next] | [standalone]


#11944

FromRobert van der Hulst <rjvanderhulst@gmail.com>
Date2018-09-18 03:10 -0700
Message-ID<42f1ded7-0cc8-4b69-a3e3-598da2c35777@googlegroups.com>
In reply to#11942
Op dinsdag 18 september 2018 11:07:32 UTC+2 schreef Jeff Rollo:
> Hi Robert,
> 
> Yes all three of those files are in the programs install directory.
> 
> The following vode produced these results, but still no file.
> 
> 		AAdd(aDBF, {"ClCode", "C", 10, 0})
> 		AAdd(aDBF, {"ClName", "C", 100, 0})
> 		AAdd(aDBF, {"ClAdd1", "C", 100, 0})   
> 		AAdd(aDBF, {"ClAdd2", "C", 100, 0})
> 		AAdd(aDBF, {"ClState", "C", 3, 0})
> 		AAdd(aDBF, {"ClSuburb", "C", 50, 0}) 
> 		AAdd(aDBF, {"ClPhone", "N", 10, 0})
> 		AAdd(aDBF, {"ClPcode", "N", 4, 0})
> 		AAdd(aDBF, {"ClABN", "C", 20, 0})
> 		AAdd(aDBF, {"ClEmail", "C", 100, 0})
> 		AAdd(aDBF, {"ClComments", "M", 10, 0})
> ??		DBCREATE("Client.dbf", aDBF, "DBFCDX")    //T
> //	   oDB:Create(CurDir(), aDBF, "DBFCDX")
> 	   oServer := CLIENT{self}
> 
> ??	   oServer:CreateIndex("Client", "CLCode",,.T.)          //T
> ??	   oServer:CreateOrder("CLName", "Client", "ClName")     //T
> ??	   oServer:CreateOrder("ClState", "Client", "ClState")   //T
> ??	   oServer:CreateOrder("CLCodeName", "Client", (AllTrim(CLIENT->ClCode) + " " + AllTrim(CLIENT->ClName)))     //F
> ??	   oServer:CreateOrder("CLPcode", "Client", "ClPCode")   //T
> 	 
> 
> I have noticed that CurDir is NOT putting the c:\ in front of the path, could that be it?

If all methods return TRUE then the file is created on another location than you think.
Try to add ? oServer:Info(DBI_FULLPATH) after opening the file. It should show you the location.
Robert

[toc] | [prev] | [next] | [standalone]


#11945

FromFranz Rachbauer <office@rachbauer.org>
Date2018-09-18 12:34 +0200
Message-ID<pnqkcg$1tv9$1@gioia.aioe.org>
In reply to#11944
If OS is W10 look at c:\users\..., maybe W10 creates your files in your 
user dir when you try to create it under c:\program files.
Franz

> 
> If all methods return TRUE then the file is created on another location than you think.
> Try to add ? oServer:Info(DBI_FULLPATH) after opening the file. It should show you the location.
> Robert
> 


---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus

[toc] | [prev] | [next] | [standalone]


#11946

FromJeff Rollo <jrollo64@gmail.com>
Date2018-09-18 04:23 -0700
Message-ID<fa817496-666c-427f-a1d1-ca0e075b35c2@googlegroups.com>
In reply to#11945
   cCurDir := CurDir()
   oDB := CurDrive() + ":\" +cCurDir +"\"+ "CLIENT.DBF"
   ? File("CLIENT.DBF") RETURNS T
   ? File( oDB)         RETURNS T
   If File(oDB) == .F.  
   	? "In Here"
		aDBF := {}
		AAdd(aDBF, {"ClCode", "C", 10, 0})
		AAdd(aDBF, {"ClName", "C", 100, 0})
		AAdd(aDBF, {"ClAdd1", "C", 100, 0})   
		AAdd(aDBF, {"ClAdd2", "C", 100, 0})
		AAdd(aDBF, {"ClState", "C", 3, 0})
		AAdd(aDBF, {"ClSuburb", "C", 50, 0}) 
		AAdd(aDBF, {"ClPhone", "N", 10, 0})
		AAdd(aDBF, {"ClPcode", "N", 4, 0})
		AAdd(aDBF, {"ClABN", "C", 20, 0})
		AAdd(aDBF, {"ClEmail", "C", 100, 0})
		AAdd(aDBF, {"ClComments", "M", 10, 0})
		DBCREATE(oDB, aDBF, "DBFCDX")
	   oServer := CLIENT{self}
      ? oServer:Info(DBI_FULLPATH)       Returns c:\Program Files(886)\Business Manager\Client.dbf
      ? oDB                              Returns c:\Program Files(886)\Business Manager\Client.dbf
	   oServer:CreateIndex("Client", "CLCode",,.T.)
	   oServer:CreateOrder("CLName", "Client", "ClName")
	   oServer:CreateOrder("ClState", "Client", "ClState")
	   oServer:CreateOrder("CLCodeName", "Client", (AllTrim(CLIENT->ClCode) + " " + AllTrim(CLIENT->ClName)))
	   oServer:CreateOrder("CLPcode", "Client", "ClPCode")
	   oServer:Close()
  	ENDIF


YET, NO Client.* file is in the  c:\Program Files(886)\Business Manager\Client.dbf

[toc] | [prev] | [next] | [standalone]


#11948

FromMathias <mathias.hakansson@consultec.se>
Date2018-09-18 04:57 -0700
Message-ID<5e95e99b-611a-469e-8f7a-68492ff8819c@googlegroups.com>
In reply to#11946
You should not try to create files under C:\program files. Try C:\users\public\[AppName]\ instead or in the users profile. 

The windows and the program files directories are protected and files that are written here can be virtualized, which means that they are saved in the virtual store for the user instead (C:\Users\<name>\AppData\Local\VirtualStore).

/Mathias

Den tisdag 18 september 2018 kl. 13:23:15 UTC+2 skrev Jeff Rollo:
> cCurDir := CurDir()
>    oDB := CurDrive() + ":\" +cCurDir +"\"+ "CLIENT.DBF"
>    ? File("CLIENT.DBF") RETURNS T
>    ? File( oDB)         RETURNS T
>    If File(oDB) == .F.  
>    	? "In Here"
> 		aDBF := {}
> 		AAdd(aDBF, {"ClCode", "C", 10, 0})
> 		AAdd(aDBF, {"ClName", "C", 100, 0})
> 		AAdd(aDBF, {"ClAdd1", "C", 100, 0})   
> 		AAdd(aDBF, {"ClAdd2", "C", 100, 0})
> 		AAdd(aDBF, {"ClState", "C", 3, 0})
> 		AAdd(aDBF, {"ClSuburb", "C", 50, 0}) 
> 		AAdd(aDBF, {"ClPhone", "N", 10, 0})
> 		AAdd(aDBF, {"ClPcode", "N", 4, 0})
> 		AAdd(aDBF, {"ClABN", "C", 20, 0})
> 		AAdd(aDBF, {"ClEmail", "C", 100, 0})
> 		AAdd(aDBF, {"ClComments", "M", 10, 0})
> 		DBCREATE(oDB, aDBF, "DBFCDX")
> 	   oServer := CLIENT{self}
>       ? oServer:Info(DBI_FULLPATH)       Returns c:\Program Files(886)\Business Manager\Client.dbf
>       ? oDB                              Returns c:\Program Files(886)\Business Manager\Client.dbf
> 	   oServer:CreateIndex("Client", "CLCode",,.T.)
> 	   oServer:CreateOrder("CLName", "Client", "ClName")
> 	   oServer:CreateOrder("ClState", "Client", "ClState")
> 	   oServer:CreateOrder("CLCodeName", "Client", (AllTrim(CLIENT->ClCode) + " " + AllTrim(CLIENT->ClName)))
> 	   oServer:CreateOrder("CLPcode", "Client", "ClPCode")
> 	   oServer:Close()
>   	ENDIF
> 
> 
> YET, NO Client.* file is in the  c:\Program Files(886)\Business Manager\Client.dbf

[toc] | [prev] | [next] | [standalone]


#11947

FromJeff Rollo <jrollo64@gmail.com>
Date2018-09-18 04:27 -0700
Message-ID<051b9cd6-e808-42da-b0b4-ec88ae1ac8b9@googlegroups.com>
In reply to#11945
I just found the database! It's in C:\Users\Jeff\AppData\Local\VirtualStore\Program Files (x86)\Business Manager

WTH is THAT? And more importantly, WHY? Especially when oServer:Info(DBI_FULLPATH) says it is where it should be?

How can I force the creation in the correct folder? (c:\Program Files(x86)\Business Manager\Client.dbf in this case)

[toc] | [prev] | [next] | [standalone]


#11949

FromFranz Rachbauer <office@rachbauer.org>
Date2018-09-18 14:00 +0200
Message-ID<pnqpck$6uf$1@gioia.aioe.org>
In reply to#11947
W10 does not allow user data in program files and program files (x86), 
use other installation dir (e.g. c:\AppName or c:\Company\AppName) and 
it does what you want.
Franz

Am 18.09.2018 um 13:27 schrieb Jeff Rollo:
> I just found the database! It's in C:\Users\Jeff\AppData\Local\VirtualStore\Program Files (x86)\Business Manager
> 
> WTH is THAT? And more importantly, WHY? Especially when oServer:Info(DBI_FULLPATH) says it is where it should be?
> 
> How can I force the creation in the correct folder? (c:\Program Files(x86)\Business Manager\Client.dbf in this case)
> 


---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus

[toc] | [prev] | [next] | [standalone]


#11950

FromJeff Rollo <jrollo64@gmail.com>
Date2018-09-18 05:05 -0700
Message-ID<531bc0ef-0b4c-4976-8e45-6cdd693eebdc@googlegroups.com>
In reply to#11949
Ok. Thanks Franz and Mathias. I'll do that. But still why did it say it was in the current directory, when it clearly wasn't?

[toc] | [prev] | [next] | [standalone]


#11951

FromJeff Rollo <jrollo64@gmail.com>
Date2018-09-18 05:06 -0700
Message-ID<f97ebb44-e4bf-4870-b8ce-6e3b28140ae7@googlegroups.com>
In reply to#11950
Thank you all very much for your help.

[toc] | [prev] | [next] | [standalone]


#11952

FromLeo_Bond <l.bond@bk.ru>
Date2018-09-18 05:37 -0700
Message-ID<f6b76c10-7c9f-41c6-9833-2108dce37017@googlegroups.com>
In reply to#11951
вторник, 18 сентября 2018 г., 15:06:04 UTC+3 пользователь Jeff Rollo написал:
> Thank you all very much for your help.

Hi, Jeff.
Read this about Program Files and VirtualStore.
https://answers.microsoft.com/en-us/windows/forum/windows_vista-windows_install/trying-to-install-app-software-to-c-program-files/ed57e3a6-6bea-40b8-939b-b9bf27041044
The best way, as suggusted, is to use your own folder. Forget about PF and PF(x86).

[toc] | [prev] | [next] | [standalone]


#11954

From"Wolfgang Riedmann" <wriedmann@gmail.com>
Date2018-09-18 16:18 +0200
Message-ID<g0cfpbFi9rrU1@mid.individual.net>
In reply to#11950
Hi Jeff,

> Ok. Thanks Franz and Mathias. I'll do that. But still why did it say
> it was in the current directory, when it clearly wasn't?

this is done by Windows 10 to remain compatible with earlier Windows
versions.

If you manifest your executable as compatible with Windows 10, your
programm will return you an error instead of using the VirtualStore
structure (that is also used when you try to write to the Windows
directory).

Wolfgang



-- 

[toc] | [prev] | [next] | [standalone]


#11953

Fromdlzc <dlzc1@cox.net>
Date2018-09-18 06:48 -0700
Message-ID<3db7ea28-6a23-42ce-9875-a6b9fdcd142a@googlegroups.com>
In reply to#11947
Dear Jeff Rollo:

On Tuesday, September 18, 2018 at 4:27:48 AM UTC-7, Jeff Rollo wrote:
> I just found the database! It's in
> C:\Users\Jeff\AppData\Local\VirtualStore\Program Files (x86)\Business Manager
> 
> WTH is THAT? And more importantly, WHY?

Micro$haft decided that a given instance of Windoze, on a given machine, can be run by different users.  When an application is installed, it will sometimes ask if it is being installed for the current, or all users.  So this means that a data set you might create, will be for all users, or current users, depending on how the application is installed.

The next decision they made, was to allow "Documents and Settings" to be more easily transferred between computers.  So they enforced that anything that was not a program or program settings, is forced into the appopriate User account directory.  So that is "why".

> Especially when oServer:Info(DBI_FULLPATH) says it is where it should be?
> 
> How can I force the creation in the correct folder?
> (c:\Program Files(x86)\Business Manager\Client.dbf in this case)

When you try and outsmart M$, the very next update, outsmarts you.  They have since Windows XP, denigrated putting ANY data files in the root directory, and ANY data files inside Program Files.

How you got fooled, is that VO gives you SAFE relative addresses, relative to your user account.  If you specify "C:\MyDirectory\..." with every call, you can accomplish what you intend AND this data will be out-of-reach of many of the various transfer wizards your clients will use in the future.

It is better to ride the horse in the direction it is going.  Much easier on you.

David A. Smith

[toc] | [prev] | [next] | [standalone]


#11957

FromMathias <mathias.hakansson@consultec.se>
Date2018-09-19 04:43 -0700
Message-ID<f2d9d934-2b8e-48c7-9d57-e68de0499307@googlegroups.com>
In reply to#11938
And another thing...

Instead of specifying the structure of the DBF-file you I have created a method that automatically creates a DBF or adds missing fields or indexes.

See
https://groups.google.com/forum/?hl=sv#!searchin/comp.lang.clipper.visual-objects/dbundersok/comp.lang.clipper.visual-objects/C3O4tgRj6sM/X46hBvfa_aMJ 

/Mathias

Den tisdag 18 september 2018 kl. 08:48:37 UTC+2 skrev Jeff Rollo:
> In my start() Method for my app I have the following code: 
> 
> method Start() class App
> 	local oMainWindow as TopAppWindow
> 	LOCAL oServer
> 	local aDBF, aDBF2, aDBF3 as array
> 	local oFileSpec
> //	Local oDB as DBFileSpec
> 	local n := 0  
> 	request dbfcdx
> 	SetPath(CurDir())
>   	self:Initialize()
>    Enable3dControls()
> 	oMainWindow := TopAppWindow{self}
> 	oMainWindow:Show(SHOWZOOMED)
> 	oMainWindow:Caption := "Business Manager v1.0" 
> 	RddSetDefault("DBFCDX")
>    SetExclusive(FALSE)
>    SetDeleted(true) 
>    oMainWindow:Icon := BMICON{}
> 	oMainWindow:IconSm := BMICON{} 
>    SetEpoch(2000)
>    SetPath(CurDir())
>    If File(CurDir() + "client.dbf") == .F.
> //		oDB := DbFileSpec{}
> 		aDBF := {}
> 		AAdd(aDBF, {"ClCode", "C", 10, 0})
> 		AAdd(aDBF, {"ClName", "C", 100, 0})
> 		AAdd(aDBF, {"ClAdd1", "C", 100, 0})   
> 		AAdd(aDBF, {"ClAdd2", "C", 100, 0})
> 		AAdd(aDBF, {"ClState", "C", 3, 0})
> 		AAdd(aDBF, {"ClSuburb", "C", 50, 0}) 
> 		AAdd(aDBF, {"ClPhone", "N", 10, 0})
> 		AAdd(aDBF, {"ClPcode", "N", 4, 0})
> 		AAdd(aDBF, {"ClABN", "C", 20, 0})
> 		AAdd(aDBF, {"ClEmail", "C", 100, 0})
> 		AAdd(aDBF, {"ClComments", "M", 10, 0})
> 		DBCREATE("Client.dbf", aDBF, "DBFCDX")
> //	   oDB:Create(CurDir(), aDBF, "DBFCDX")
> 	   oServer := CLIENT{self}
> 
> 	   oServer:CreateIndex("Client", "CLCode",,.T.)
> 	   oServer:CreateOrder("CLName", "Client", "ClName")
> 	   oServer:CreateOrder("ClState", "Client", "ClState")
> 	   oServer:CreateOrder("CLCodeName", "Client", (AllTrim(CLIENT->ClCode) + " " + AllTrim(CLIENT->ClName)))
> 	   oServer:CreateOrder("CLPcode", "Client", "ClPCode")
> 	   oServer:Close()
>   	ENDIF
>  
> 
> Try as I might, the files are not being created. There's no runtime or compiler errors to give me any clues, I've been all over Google, the printed Manual, the online manual and this Group, and still cannot work out where I'm going wrong.

[toc] | [prev] | [next] | [standalone]


#11958

FromMathias <mathias.hakansson@consultec.se>
Date2018-09-19 05:03 -0700
Message-ID<337add3b-fa4f-4b21-a819-95f783d73451@googlegroups.com>
In reply to#11957
Adding missing text in my last message...

It uses the structure and the indexes that you have defines for the dbf in the DB server editor. The thing about this is that it's very easy to add a field I a dbf. The DBF file structure updates automatically and you only have to change the structure in the DB server editor.

/Mathias

Den onsdag 19 september 2018 kl. 13:43:25 UTC+2 skrev Mathias:
> And another thing...
> 
> Instead of specifying the structure of the DBF-file you I have created a method that automatically creates a DBF or adds missing fields or indexes.
> 
> See
> https://groups.google.com/forum/?hl=sv#!searchin/comp.lang.clipper.visual-objects/dbundersok/comp.lang.clipper.visual-objects/C3O4tgRj6sM/X46hBvfa_aMJ 
> 
> /Mathias
> 
> Den tisdag 18 september 2018 kl. 08:48:37 UTC+2 skrev Jeff Rollo:
> > In my start() Method for my app I have the following code: 
> > 
> > method Start() class App
> > 	local oMainWindow as TopAppWindow
> > 	LOCAL oServer
> > 	local aDBF, aDBF2, aDBF3 as array
> > 	local oFileSpec
> > //	Local oDB as DBFileSpec
> > 	local n := 0  
> > 	request dbfcdx
> > 	SetPath(CurDir())
> >   	self:Initialize()
> >    Enable3dControls()
> > 	oMainWindow := TopAppWindow{self}
> > 	oMainWindow:Show(SHOWZOOMED)
> > 	oMainWindow:Caption := "Business Manager v1.0" 
> > 	RddSetDefault("DBFCDX")
> >    SetExclusive(FALSE)
> >    SetDeleted(true) 
> >    oMainWindow:Icon := BMICON{}
> > 	oMainWindow:IconSm := BMICON{} 
> >    SetEpoch(2000)
> >    SetPath(CurDir())
> >    If File(CurDir() + "client.dbf") == .F.
> > //		oDB := DbFileSpec{}
> > 		aDBF := {}
> > 		AAdd(aDBF, {"ClCode", "C", 10, 0})
> > 		AAdd(aDBF, {"ClName", "C", 100, 0})
> > 		AAdd(aDBF, {"ClAdd1", "C", 100, 0})   
> > 		AAdd(aDBF, {"ClAdd2", "C", 100, 0})
> > 		AAdd(aDBF, {"ClState", "C", 3, 0})
> > 		AAdd(aDBF, {"ClSuburb", "C", 50, 0}) 
> > 		AAdd(aDBF, {"ClPhone", "N", 10, 0})
> > 		AAdd(aDBF, {"ClPcode", "N", 4, 0})
> > 		AAdd(aDBF, {"ClABN", "C", 20, 0})
> > 		AAdd(aDBF, {"ClEmail", "C", 100, 0})
> > 		AAdd(aDBF, {"ClComments", "M", 10, 0})
> > 		DBCREATE("Client.dbf", aDBF, "DBFCDX")
> > //	   oDB:Create(CurDir(), aDBF, "DBFCDX")
> > 	   oServer := CLIENT{self}
> > 
> > 	   oServer:CreateIndex("Client", "CLCode",,.T.)
> > 	   oServer:CreateOrder("CLName", "Client", "ClName")
> > 	   oServer:CreateOrder("ClState", "Client", "ClState")
> > 	   oServer:CreateOrder("CLCodeName", "Client", (AllTrim(CLIENT->ClCode) + " " + AllTrim(CLIENT->ClName)))
> > 	   oServer:CreateOrder("CLPcode", "Client", "ClPCode")
> > 	   oServer:Close()
> >   	ENDIF
> >  
> > 
> > Try as I might, the files are not being created. There's no runtime or compiler errors to give me any clues, I've been all over Google, the printed Manual, the online manual and this Group, and still cannot work out where I'm going wrong.

[toc] | [prev] | [next] | [standalone]


#11959

FromJeff Rollo <jrollo64@gmail.com>
Date2018-09-19 05:20 -0700
Message-ID<519964c7-50c4-4755-9852-51158b6bcfd7@googlegroups.com>
In reply to#11957
I'd love to read this Mathias, but I'm afraid no sprecken ze Deutch 😎. I followed the link but I always end up back at my original post.....

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web