Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #3956 > unrolled thread
| Started by | "John S." <jsommer_notthis_@alltel.net> |
|---|---|
| First post | 2012-08-16 13:23 -0400 |
| Last post | 2012-08-21 09:24 +0200 |
| Articles | 16 — 5 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
SP1 to SP4 CDX Tag Files "John S." <jsommer_notthis_@alltel.net> - 2012-08-16 13:23 -0400
Re: SP1 to SP4 CDX Tag Files "Stephen Quinn" <stevejqNO@bigpondSPAM.net.au> - 2012-08-17 10:47 +1000
Re: SP1 to SP4 CDX Tag Files Sherlock <sherlock@sherlock.com.au> - 2012-08-18 07:28 -0700
Re: SP1 to SP4 CDX Tag Files "John S." <jsommer_notthis_@alltel.net> - 2012-08-20 17:30 -0400
Re: SP1 to SP4 CDX Tag Files "Stephen Quinn" <stevejqNO@bigpondSPAM.net.au> - 2012-08-21 10:18 +1000
Re: SP1 to SP4 CDX Tag Files "John S." <jsommer_notthis_@alltel.net> - 2012-08-20 20:58 -0400
Re: SP1 to SP4 CDX Tag Files "Stephen Quinn" <stevejqNO@bigpondSPAM.net.au> - 2012-08-21 11:15 +1000
Re: SP1 to SP4 CDX Tag Files "John S." <jsommer_notthis_@alltel.net> - 2012-08-20 21:30 -0400
Re: SP1 to SP4 CDX Tag Files "Wolfgang Riedmann" <wriedmann@gmail.com> - 2012-08-21 06:11 +0000
Re: SP1 to SP4 CDX Tag Files "John S." <jsommer_notthis_@alltel.net> - 2012-08-22 17:44 -0400
Re: SP1 to SP4 CDX Tag Files "Wolfgang Riedmann" <wriedmann@gmail.com> - 2012-08-23 06:37 +0000
Re: SP1 to SP4 CDX Tag Files "John S." <jsommer_notthis_@alltel.net> - 2012-08-23 07:46 -0400
Re: SP1 to SP4 CDX Tag Files "Stephen Quinn" <stevejqNO@bigpondSPAM.net.au> - 2012-08-24 01:01 +1000
Re: SP1 to SP4 CDX Tag Files "John S." <jsommer_notthis_@alltel.net> - 2012-08-23 11:28 -0400
Re: SP1 to SP4 CDX Tag Files "Stephen Quinn" <stevejqNO@bigpondSPAM.net.au> - 2012-08-24 02:18 +1000
Re: SP1 to SP4 CDX Tag Files Karl Faller <k.faller_withoutthat_@onlinehome.de> - 2012-08-21 09:24 +0200
| From | "John S." <jsommer_notthis_@alltel.net> |
|---|---|
| Date | 2012-08-16 13:23 -0400 |
| Subject | SP1 to SP4 CDX Tag Files |
| Message-ID | <2ff08$502d2bd8$6215bed0$26605@ALLTEL.NET> |
I am trying to move from 2.8 SP1 to 2.8 SP4 and am having issues with
creating any more than 1 tag in my DBFCDX tables.
I created a small sample function below that shows the difference
In SP1, the following function will create a TEST1.CDX file with 2 tags
named TEST11 and TEST12
In SP4, this code will not create the TEST12 tag name
The TEST1.DBF is 3 fields 10 characters each.
FUNCTION testcdx()
LOCAL MPATH,MDBF,MBLOCK,MORDBAG,MORDTAG as STRING
MPATH:="\TEST\"
MDBF:="TEST1"
MORDBAG:=MPATH+MDBF+".CDX"
IF !File(MORDBAG)
DBUSEAREA(.T.,"DBFCDX",MPATH+MDBF+".DBF","TEST1",FALSE,FALSE)
MORDTAG:="TEST11"
MBLOCK:="FIELDA1+FIELDA2+FIELDA3"
OrdCreate(MORDBAG,MORDTAG,MBLOCK,{|| &MBLOCK })
MORDTAG:="TEST12"
MBLOCK:="FIELDA2+FIELDA1+FIELDA3"
OrdCreate(MORDBAG,MORDTAG,MBLOCK,{|| &MBLOCK })
AltD()
DbSelectArea("TEST1") ; DBCLOSEAREA()
ENDIF
return(nil)
Any help is appreciated.
Thanks,
John
[toc] | [next] | [standalone]
| From | "Stephen Quinn" <stevejqNO@bigpondSPAM.net.au> |
|---|---|
| Date | 2012-08-17 10:47 +1000 |
| Message-ID | <5wgXr.587$tH2.218@viwinnwfe01.internal.bigpond.com> |
| In reply to | #3956 |
John
What do you get when you remove all that Clipper syntax crap and use a
DBServer??
Eg
oServer := DBServer{ GetDefault() + 'Test1.dbf', DBEXCLUSIVE, FALSE,
'DBFCDX' }
oServer:CreateOrder( 'Test11', GetDefault() + 'Test1',
'FIELDA1+FIELDA2+FIELDA3', ;
{|| _FIELD->FIELDA1+_FIELD->FIELDA2+_FIELD->FIELDA3})
oServer:CreateOrder( 'Test12', GetDefault() + 'Test1',
'FIELDA2+FIELDA1+FIELDA3', ;
{|| _FIELD->FIELDA2+_FIELD->FIELDA1+_FIELD->FIELDA3})
Less code, easier to understand.
CYA
Steve
[toc] | [prev] | [next] | [standalone]
| From | Sherlock <sherlock@sherlock.com.au> |
|---|---|
| Date | 2012-08-18 07:28 -0700 |
| Message-ID | <535e81de-8432-4b69-b810-39e58c512556@googlegroups.com> |
| In reply to | #3956 |
Even less code.
You do not need the STRING and the CODEBLOCK. Pick one or the other.
cPath := "C:\temp\"
oServer := DBServer{ cPath + 'Test1.dbf', DBEXCLUSIVE, FALSE, 'DBFCDX' }
oServer:CreateOrder( 'Test11', cPath + 'Test1','FIELDA1+FIELDA2+FIELDA3 )
oServer:CreateOrder( 'Test12', cPath + 'Test1','FIELDA2+FIELDA1+FIELDA3 )
Phil
[toc] | [prev] | [next] | [standalone]
| From | "John S." <jsommer_notthis_@alltel.net> |
|---|---|
| Date | 2012-08-20 17:30 -0400 |
| Message-ID | <e9f0f$5032abeb$6215bed0$27881@ALLTEL.NET> |
| In reply to | #3960 |
Hi Phil and Steve,
Thanks for the suggestions. All three of the following code segments will
NOT create the TEST12 tag
1] Clipper crap - least amount of code and eaisest to understand <s>
I did remove the codeblock
DBUSEAREA(.T.,"DBFCDX","\TEST\TEST1.DBF","TEST1",FALSE,FALSE)
OrdCreate("\TEST\TEST.CDX",'TEST11','FIELDA1+FIELDA2+FIELDA3')
OrdCreate("\TEST\TEST.CDX",'TEST12','FIELDA2+FIELDA1+FIELDA3')
2] Dbserver with codeblock removed
MPATH:="\TEST\"
oServer := DbServer{ MPATH + 'Test1.dbf', DBEXCLUSIVE, FALSE, 'DBFCDX' }
oServer:CreateOrder( 'Test11', MPATH +
'Test1','FIELDA1+FIELDA2+FIELDA3' )
oServer:CreateOrder( 'Test12', MPATH +
'Test1','FIELDA2+FIELDA1+FIELDA3' )
3] Dbserver with codeblock in
oServer := DBServer{ GetDefault() + 'Test1.dbf', DBEXCLUSIVE, FALSE,
'DBFCDX' }
oServer:CreateOrder( 'Test11', GetDefault() + 'Test1',
'FIELDA1+FIELDA2+FIELDA3', ;
{|| _FIELD->FIELDA1+_FIELD->FIELDA2+_FIELD->FIELDA3})
oServer:CreateOrder( 'Test12', GetDefault() + 'Test1',
'FIELDA2+FIELDA1+FIELDA3', ;
{|| _FIELD->FIELDA2+_FIELD->FIELDA1+_FIELD->FIELDA3})
I am not able to open up a .DBF file in the DB server editor (DBFCDX). Any
other ideas?
Thanks,
John
"Sherlock" <sherlock@sherlock.com.au> wrote in message
news:535e81de-8432-4b69-b810-39e58c512556@googlegroups.com...
> Even less code.
> You do not need the STRING and the CODEBLOCK. Pick one or the other.
>
> cPath := "C:\temp\"
>
> oServer := DBServer{ cPath + 'Test1.dbf', DBEXCLUSIVE, FALSE, 'DBFCDX' }
>
> oServer:CreateOrder( 'Test11', cPath + 'Test1','FIELDA1+FIELDA2+FIELDA3 )
> oServer:CreateOrder( 'Test12', cPath + 'Test1','FIELDA2+FIELDA1+FIELDA3 )
>
> Phil
>
[toc] | [prev] | [next] | [standalone]
| From | "Stephen Quinn" <stevejqNO@bigpondSPAM.net.au> |
|---|---|
| Date | 2012-08-21 10:18 +1000 |
| Message-ID | <7tAYr.731$tH2.266@viwinnwfe01.internal.bigpond.com> |
| In reply to | #3964 |
John > I am not able to open up a .DBF file in the DB server editor (DBFCDX). > Any other ideas? Have you checked the DBF for data corruption (especially as you swap the first 2 fields in the TAGs)? Can you open it in the editor if you delete the index fle? Have you stepped through that code in the debugger to see if there's an error your not seeing? What are the debug settings your using in the IDE? What if you reverse the CreateOrder() lines do you still lose the same TAG or lose the other? Code as simple as that 'should' work - somethings not right and I doubt it's a code problem. CYA Steve
[toc] | [prev] | [next] | [standalone]
| From | "John S." <jsommer_notthis_@alltel.net> |
|---|---|
| Date | 2012-08-20 20:58 -0400 |
| Message-ID | <d724b$5032dcb4$6215bed0$13040@ALLTEL.NET> |
| In reply to | #3966 |
I have tried to open several dbf files and I can not open any of them. I have used the debbuger to step through each line of the code. I am wondering if my installation is corrupt. My sample dbf was as simple as I could get to try to find out my problem. Thanks again for your help as I hope this is not a code problem since it has been the same since the 1980's. Is anyone using SP4 with dbfcdx and multiple tags? Thanks again, John "Stephen Quinn" <stevejqNO@bigpondSPAM.net.au> wrote in message news:7tAYr.731$tH2.266@viwinnwfe01.internal.bigpond.com... > John > >> I am not able to open up a .DBF file in the DB server editor (DBFCDX). >> Any other ideas? > Have you checked the DBF for data corruption (especially as you swap the > first 2 fields in the TAGs)? > Can you open it in the editor if you delete the index fle? > Have you stepped through that code in the debugger to see if there's an > error your not seeing? > What are the debug settings your using in the IDE? > > What if you reverse the CreateOrder() lines do you still lose the same TAG > or lose the other? > > Code as simple as that 'should' work - somethings not right and I doubt > it's a code problem. > > CYA > Steve >
[toc] | [prev] | [next] | [standalone]
| From | "Stephen Quinn" <stevejqNO@bigpondSPAM.net.au> |
|---|---|
| Date | 2012-08-21 11:15 +1000 |
| Message-ID | <UhBYr.733$tH2.605@viwinnwfe01.internal.bigpond.com> |
| In reply to | #3967 |
John
Check your environment PATH statement
- make sure the DLLs in the current CAVO28\Bin take precedence
Do you see the same results when using a .exe outside the IDE?
CYA
Steve
[toc] | [prev] | [next] | [standalone]
| From | "John S." <jsommer_notthis_@alltel.net> |
|---|---|
| Date | 2012-08-20 21:30 -0400 |
| Message-ID | <5fbb1$5032e424$6215bed0$15469@ALLTEL.NET> |
| In reply to | #3968 |
I created a new directory with the sp4 dll's and rdd's with an exe with the same result. My path statement contains no references to vo. Thanks Steve "Stephen Quinn" <stevejqNO@bigpondSPAM.net.au> wrote in message news:UhBYr.733$tH2.605@viwinnwfe01.internal.bigpond.com... > John > > Check your environment PATH statement > - make sure the DLLs in the current CAVO28\Bin take precedence > > Do you see the same results when using a .exe outside the IDE? > > CYA > Steve >
[toc] | [prev] | [next] | [standalone]
| From | "Wolfgang Riedmann" <wriedmann@gmail.com> |
|---|---|
| Date | 2012-08-21 06:11 +0000 |
| Message-ID | <a9gn46F22vU1@mid.individual.net> |
| In reply to | #3967 |
Hi John,
> Is anyone using SP4 with dbfcdx and multiple tags?
yes, in all my apps, and without any problem. All orders are created in
the same code since VO 2.0 (all informations are read from a dictionary
DBF):
cbExpression := &("{||" + cIndexExpr + "}")
oServer:CreateOrder( cTagName, cFileName, cIndexExpr, cbExpression,
false )
Wolfgang
[toc] | [prev] | [next] | [standalone]
| From | "John S." <jsommer_notthis_@alltel.net> |
|---|---|
| Date | 2012-08-22 17:44 -0400 |
| Message-ID | <be352$5035521d$6215bed0$31993@ALLTEL.NET> |
| In reply to | #3970 |
Hi Wolfgang,
I too have used a data dictionary with the same code since VO 2.0.
Using what I could of your code I still can not get it to work. This code
works fine in SP1 but not in SP4. Could you confirm for me that this code
works for you or tell me why it is not working. Thanks for your help.
John
METHOD Start() CLASS App
local cbExpression as object
local cTagName,cFileName,cIndexExpr as string
local adbfstru as array
local oServer as DbServer
adbfstru:={}
AAdd(adbfstru,{"FIELDA1","C",10,0})
AAdd(adbfstru,{"FIELDA2","C",10,0})
AAdd(adbfstru,{"FIELDA3","C",10,0})
DBCREATE('\TEMP\TEST1.DBF',adbfstru,"DBFCDX",true,"TEST1")
TEST1->DBCLOSEAREA()
oServer := DbServer{'\TEMP\TEST1.DBF', DBEXCLUSIVE, FALSE,'DBFCDX' }
cFileName:="\TEMP\TEST1.CDX"
cTagName:="TAG1"
cIndexExpr:='FIELDA1+FIELDA2+FIELDA3'
cbExpression := &("{||" + cIndexExpr + "}")
if !oServer:CreateOrder( cTagName, cFileName, cIndexExpr,
cbExpression,false)
TextBox{nil,"System Message","Did not create "+cTagName}:SHOW()
endif
cTagName:="TAG2"
cIndexExpr:='FIELDA2+FIELDA1+FIELDA3'
cbExpression := &("{||" + cIndexExpr + "}")
IF !oServer:CreateOrder( cTagName, cFileName, cIndexExpr,
cbExpression,false)
TextBox{nil,"System Message","Did not create "+cTagName}:SHOW()
ENDIF
"Wolfgang Riedmann" <wriedmann@gmail.com> wrote in message
news:a9gn46F22vU1@mid.individual.net...
> Hi John,
>
>> Is anyone using SP4 with dbfcdx and multiple tags?
>
> yes, in all my apps, and without any problem. All orders are created in
> the same code since VO 2.0 (all informations are read from a dictionary
> DBF):
>
> cbExpression := &("{||" + cIndexExpr + "}")
> oServer:CreateOrder( cTagName, cFileName, cIndexExpr, cbExpression,
> false )
>
> Wolfgang
[toc] | [prev] | [next] | [standalone]
| From | "Wolfgang Riedmann" <wriedmann@gmail.com> |
|---|---|
| Date | 2012-08-23 06:37 +0000 |
| Message-ID | <a9m1e7FqvhU1@mid.individual.net> |
| In reply to | #3986 |
Hi John, your code fails also on SP3, and other versions of VO I don't have on my current system. The strange this is that the second order is not created, and if I don't remove the index file, even the first one is not created. Try to omit the name of the index file (as is it auto-opened) and then your code will work. oServer:CreateOrder( cTagName,, cIndexExpr,cbExpression,false) I don't know why this is so, but at least your code will work. I think that the filename has only to be specified if it is not the standard one. HTH Wolfgang
[toc] | [prev] | [next] | [standalone]
| From | "John S." <jsommer_notthis_@alltel.net> |
|---|---|
| Date | 2012-08-23 07:46 -0400 |
| Message-ID | <7ef12$50361781$4b75098d$23924@ALLTEL.NET> |
| In reply to | #3989 |
Hi Wolfgang,
Thank you very much. This worked. I did some more testing and if the
file name for the tag is different from the standard one, it also fails.
This is not an issue for me as mine are all standard but I assume you can no
longer create a tag file with multiple tags and a "non-standard" name post
SP1.
Thanks again,
John
"Wolfgang Riedmann" <wriedmann@gmail.com> wrote in message
news:a9m1e7FqvhU1@mid.individual.net...
> Hi John,
>
> your code fails also on SP3, and other versions of VO I don't have on
> my current system.
>
> The strange this is that the second order is not created, and if I
> don't remove the index file, even the first one is not created.
>
> Try to omit the name of the index file (as is it auto-opened) and then
> your code will work.
>
>
> oServer:CreateOrder( cTagName,, cIndexExpr,cbExpression,false)
>
>
> I don't know why this is so, but at least your code will work.
>
> I think that the filename has only to be specified if it is not the
> standard one.
>
> HTH
>
> Wolfgang
[toc] | [prev] | [next] | [standalone]
| From | "Stephen Quinn" <stevejqNO@bigpondSPAM.net.au> |
|---|---|
| Date | 2012-08-24 01:01 +1000 |
| Message-ID | <DBrZr.758$Wo3.426@viwinnwfe02.internal.bigpond.com> |
| In reply to | #3992 |
John
> This is not an issue for me as mine are all standard but I assume you can
> no longer create a tag file with multiple tags and a "non-standard" name
> post SP1.
Do some more testing - if the index filename is different form the 'DBF
name' then you MUST open them in code.
Eg
// Depends on the AUTO_OPEN setting in the enviroment.
oServer := DBServer{ 'TEST1.DBF' } // Will also open TEST1.CDX
automatically
// Open a second index file that uses the same DBF
oServer:SetIndex( 'TEST2.CDX' ) // This is a requirement when
using other indices
CYA
Steve
[toc] | [prev] | [next] | [standalone]
| From | "John S." <jsommer_notthis_@alltel.net> |
|---|---|
| Date | 2012-08-23 11:28 -0400 |
| Message-ID | <bec47$50364b5f$4b75098d$18404@ALLTEL.NET> |
| In reply to | #3994 |
Hi Steve,
Testing is all I have been doing <s>. I made two small changes to my
original example to include your suggestion. The issue is not using a tag
file different from the DBF name, it is creating the second tag in that
file. The code below will not create the second tag. Let me know if you
can make this work.
Thanks for your help,
John
METHOD Start() CLASS App
local cbExpression as object
local cTagName,cFileName,cIndexExpr as string
local adbfstru as array
local oServer as DbServer
adbfstru:={}
AAdd(adbfstru,{"FIELDA1","C",10,0})
AAdd(adbfstru,{"FIELDA2","C",10,0})
AAdd(adbfstru,{"FIELDA3","C",10,0})
DBCREATE('\TEMP\TEST1.DBF',adbfstru,"DBFCDX",true,"TEST1")
TEST1->DBCLOSEAREA()
oServer := DbServer{'\TEMP\TEST1.DBF', DBEXCLUSIVE, FALSE,'DBFCDX' }
oServer:SetIndex( 'TEST2.CDX' ) // Modification to original example
cFileName:="\TEMP\TEST2.CDX" // Modification to original example
cTagName:="TAG1"
cIndexExpr:='FIELDA1+FIELDA2+FIELDA3'
cbExpression := &("{||" + cIndexExpr + "}")
if !oServer:CreateOrder( cTagName, cFileName, cIndexExpr,
cbExpression,false)
TextBox{nil,"System Message","Did not create "+cTagName}:SHOW()
endif
cTagName:="TAG2"
cIndexExpr:='FIELDA2+FIELDA1+FIELDA3'
cbExpression := &("{||" + cIndexExpr + "}")
IF !oServer:CreateOrder( cTagName, cFileName, cIndexExpr,
cbExpression,false)
TextBox{nil,"System Message","Did not create "+cTagName}:SHOW()
ENDIF
"Stephen Quinn" <stevejqNO@bigpondSPAM.net.au> wrote in message
news:DBrZr.758$Wo3.426@viwinnwfe02.internal.bigpond.com...
> John
>
>> This is not an issue for me as mine are all standard but I assume you can
>> no longer create a tag file with multiple tags and a "non-standard" name
>> post SP1.
>
> Do some more testing - if the index filename is different form the 'DBF
> name' then you MUST open them in code.
> Eg
> // Depends on the AUTO_OPEN setting in the enviroment.
> oServer := DBServer{ 'TEST1.DBF' } // Will also open TEST1.CDX
> automatically
> // Open a second index file that uses the same DBF
> oServer:SetIndex( 'TEST2.CDX' ) // This is a requirement
> when using other indices
>
> CYA
> Steve
>
>
[toc] | [prev] | [next] | [standalone]
| From | "Stephen Quinn" <stevejqNO@bigpondSPAM.net.au> |
|---|---|
| Date | 2012-08-24 02:18 +1000 |
| Message-ID | <0KsZr.813$tH2.321@viwinnwfe01.internal.bigpond.com> |
| In reply to | #3995 |
John > file. The code below will not create the second tag. Let me know if you > can make this work. Sorry - no can do. I don't have SP4 or Win7 CYA Steve
[toc] | [prev] | [next] | [standalone]
| From | Karl Faller <k.faller_withoutthat_@onlinehome.de> |
|---|---|
| Date | 2012-08-21 09:24 +0200 |
| Message-ID | <7jd638l9g8q73a553fd34qepto4q1h60b8@4ax.com> |
| In reply to | #3964 |
John, >I am not able to open up a .DBF file in the DB server editor (DBFCDX). guess what, i just tried to import a dbf in the editor, and indeed, my VO hangs.... Will write a message to Meinhard... Karl
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web