Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #1127 > unrolled thread
| Started by | "richard.townsendrose" <richard.townsendrose@gmail.com> |
|---|---|
| First post | 2011-05-18 06:31 -0700 |
| Last post | 2011-05-29 03:25 -0700 |
| Articles | 13 — 6 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
advantage - creating free tables when uisng a data dictionary "richard.townsendrose" <richard.townsendrose@gmail.com> - 2011-05-18 06:31 -0700
Re: advantage - creating free tables when uisng a data dictionary "Dirk (Belgium)" <dirk.dot.herijgers@pbprojects.dot.be> - 2011-05-18 15:07 +0000
Re: advantage - creating free tables when uisng a data dictionary "richard.townsendrose" <richard.townsendrose@gmail.com> - 2011-05-18 08:17 -0700
Re: advantage - creating free tables when uisng a data dictionary "Willie Moore" <williem@wmconsulting.com> - 2011-05-18 11:01 -0500
Re: advantage - creating free tables when uisng a data dictionary "Paul D B" <polleke@NOMORESPAMhnt.be> - 2011-05-19 09:22 +0200
Re: advantage - creating free tables when uisng a data dictionary "richard.townsendrose" <richard.townsendrose@gmail.com> - 2011-05-22 05:11 -0700
Re: advantage - creating free tables when uisng a data dictionary "Markus Lorenzi" <lo5ren23zi@modul65ine.ch> - 2011-05-22 21:45 +0200
Re: advantage - creating free tables when uisng a data dictionary "Jon J" <j@j> - 2011-05-23 10:44 +1000
Re: advantage - creating free tables when uisng a data dictionary "richard.townsendrose" <richard.townsendrose@gmail.com> - 2011-05-23 08:55 -0700
Re: advantage - creating free tables when uisng a data dictionary "richard.townsendrose" <richard.townsendrose@gmail.com> - 2011-05-23 09:40 -0700
Re: advantage - creating free tables when uisng a data dictionary "Willie Moore" <williem@wmconsulting.com> - 2011-05-24 06:39 -0500
Re: advantage - creating free tables when uisng a data dictionary "richard.townsendrose" <richard.townsendrose@gmail.com> - 2011-05-24 05:54 -0700
Re: advantage - creating free tables when uisng a data dictionary "richard.townsendrose" <richard.townsendrose@gmail.com> - 2011-05-29 03:25 -0700
| From | "richard.townsendrose" <richard.townsendrose@gmail.com> |
|---|---|
| Date | 2011-05-18 06:31 -0700 |
| Subject | advantage - creating free tables when uisng a data dictionary |
| Message-ID | <ea579f0b-c6a9-49f0-ae43-693b1b3b70e7@p13g2000yqh.googlegroups.com> |
Hi all
we have for years used ads. and have had no problem creating local
tables for reports etc.
once we are linked to the main data then i am getting a ADS 7040
error. its all to do with rights .. and file not being created.
i cannot even save a notepad file there ... tho it says its saved ...
here is the code: using W7pro 64, build 2830
richard
***************************************
METHOD SetUp() CLASS CreateDbf
// creating or opening SPOOL files
LOCAL n AS DWORD
LOCAL oSvr:=NULL_OBJECT AS dbserver
LOCAL ulRetCode AS DWORD
LOCAL hTable AS DWORD
LOCAL hIndex AS DWORD
LOCAL cWhat AS USUAL
LOCAL lNeedCDXOnly:=FALSE AS LOGIC
IF SysObject():lIPConnected // ! Empty(SysObject():GetSet(IPUser))
AX_SetConnectionHandle( 0 )
ENDIF
DosError(0) // rgtr 050409
BEGIN SEQUENCE
// is spool dir available ?
IF SELF:lSpool .AND. Empty(SysObject():GetSet(SpoolPath))
SELF:TellStat('Spool Path not specified')
BREAK 'NS'
ELSEIF ! SELF:lSpool .AND. Empty(GetDefault())
SELF:TellStat('No default directory')
BREAK 'ND'
ENDIF
IF ! File(SELF:cFullName + '.dbf') // if no dbf, delete cdx and
fpt
IF File(SELF:cFullName + '.cdx')
IF ! FErase(SELF:cFullName + '.cdx')
SELF:TellStat('Unable to remove orphan index - Error:
'+DosErrString(DosError()))
BREAK 'DC'
ENDIF
ENDIF
IF File(SELF:cFullName + '.fpt')
IF ! FErase(SELF:cFullName + '.fpt')
SELF:TellStat('Unable to remove orphan binary - Error:
'+DosErrString(DosError()))
BREAK 'DF'
ENDIF
ENDIF
ELSE // have dbf
IF SELF:lHasFPT .AND. ! File(SELF:cFullName + '.fpt') // missing
fpt - delete all
IF ! FErase(SELF:cFullName + '.dbf')
SELF:TellStat('Unable to remove table missing binary - Error:
'+DosErrString(DosError()))
BREAK 'DT'
ENDIF
IF File(SELF:cFullName + '.cdx')
IF ! FErase(SELF:cFullName + '.cdx')
SELF:TellStat('Unable to remove index missing binary - Error:
'+DosErrString(DosError()))
BREAK 'DX'
ENDIF
ENDIF
ELSE
IF ALen(SELF:aIStru) > 0 .AND. ! File(SELF:cFullName + '.cdx')
lNeedCDXOnly:=TRUE
ENDIF
ENDIF
ENDIF
// should either have all or none
IF ! File(SELF:cFullName + '.dbf') .AND. ! File(SELF:cFullName +
'.cdx')
// use ads [B]
IF lNeedCDXOnly
ulRetCode:=AdsOpenTable90(0,String2Psz(SELF:cFullName+'.dbf'),
NULL, ADS_CDX, ADS_ANSI,
ADS_PROPRIETARY_LOCKING, ADS_IGNORERIGHTS, ADS_DEFAULT,
NULL, @hTable)
// hConnect AS DWORD, pucName AS PSZ, pucAlias
AS PSZ, usTableType AS WORD, usCharType AS WORD, usLockType AS
WORD, usCheckRights AS WORD, ulOptions AS DWORD, pucCollation AS
PSZ, phTable REF DWORD
ELSE
ulRetCode:=AdsCreateTable90(0, String2Psz(SELF:cFullName
+'.dbf'), NULL, ADS_CDX, ADS_ANSI,
ADS_PROPRIETARY_LOCKING, ADS_IGNORERIGHTS, ADS_DEFAULT,
String2Psz(SELF:cStru), ADS_DEFAULT, NULL,
@hTable)
//hConnection AS DWORD, pucName AS PSZ,
pucDBObjName AS PSZ, usTableType AS WORD, usCharType AS WORD,
usLockType AS WORD, usCheckRights AS WORD, usMemoSize AS WORD,
pucFields AS PSZ, ulOptions AS DWORD, pucCollation AS PSZ,
phTable REF DWORD )
ENDIF
IF ulRetCode == AE_SUCCESS
IF lNeedCDXOnly
SELF:TellStat('Created new Table')
ELSE
SELF:TellStat('Opened Table')
ENDIF
IF ALen(SELF:aIStru) > 0
FOR n:= 1 TO ALen(SELF:aIStru)
ulRetCode:=AdsCreateIndex90(hTable, String2Psz(SELF:cFullName
+'.cdx'), String2Psz(SELF:cIndName + NTrim(n)),
String2Psz(SELF:aIStru[n]), NULL, NULL,
ADS_COMPOUND, ADS_DEFAULT, NULL, @hIndex)
// hObj AS DWORD, pucFileName AS
PSZ, pucTag AS PSZ, pucExpr AS
PSZ, pucCondition AS PSZ, pucWhile AS PSZ, ulOptions AS
DWORD, ulPageSize AS DWORD, pucCollation AS PSZ, phIndex REF DWORD
IF ulRetCode == 0
IF ulRetCode == 0
SELF:TellStat('Created new Index')
ELSE
SELF:TellStat('Failed to create Index - Error: ' +
NTrim(ulRetCode))
BREAK 'BI'
ENDIF
NEXT
ENDIF
AdsCloseTable(hTable)
ELSE
IF lNeedCDXOnly
SELF:TellStat('Failed to open Table - Error: ' +
NTrim(ulRetCode))
BREAK 'BO'
ELSE
SELF:TellStat('Failed to create Table - Error: ' +
NTrim(ulRetCode))
BREAK 'BT'
ENDIF
ENDIF
ENDIF
// test as should now have everything
IF File(SELF:cFullName + '.dbf') .AND. IIF(ALen(SELF:aIStru)>0,
File(SELF:cFullName + '.cdx'), TRUE) .AND. IIF(SELF:lHasFPT,
File(SELF:cFullName + '.fpt'), TRUE)
oSvr:=DbServer{SELF:cFullName+'.dbf', FALSE, FALSE}
IF oSvr:Used
SELF:TellStat('Table opened')
ELSE
SELF:TellStat('Failed to open Table') // - ' +
oSvr:Status:Description)
BREAK 'SO'
ENDIF
IF SELF:lClean
oSvr:FLOCK()
oSvr:zap()
oSvr:UNLOCK()
ENDIF
ELSE
SELF:TellStat('Lost Table')
BREAK 'SN'
ENDIF
RECOVER USING cWhat
DO CASE
CASE cWhat == 'NS' // no spool
CASE cWhat == 'ND' // no default
CASE cWhat == 'DC' // cdx not deleted
CASE cWhat == 'DF' // fpt not deleted
CASE cWhat == 'DT' // dbf not deleted - missing fpt
CASE cWhat == 'DX' // cdx not deleted - missing fpt
CASE cWhat == 'BO'
AdsCloseTable(hTable)
CASE cWhat == 'BT'
AdsCloseTable(hTable)
CASE cWhat == 'BI'
AdsCloseTable(hTable)
CASE cWhat == 'SO' // failed to open
oSvr:Close()
oSvr:=NULL_OBJECT
CASE cWhat == 'SN' // lost table
oSvr:=NULL_OBJECT
ENDCASE
END SEQUENCE
IF SysObject():lIPConnected // ! Empty(SysObject():GetSet(IPUser))
AX_SetConnectionHandle( SysObject():hConnHandle )
ENDIF
RETURN oSvr
[toc] | [next] | [standalone]
| From | "Dirk (Belgium)" <dirk.dot.herijgers@pbprojects.dot.be> |
|---|---|
| Date | 2011-05-18 15:07 +0000 |
| Message-ID | <8hRAp.6038$UY3.4907@newsfe20.ams2> |
| In reply to | #1127 |
Hi Richard,
We are gonna to use ADS within a few months.
I think your code and experience can save a lot of time for me.
Thanks for sharing this.
Dirk (Belgium)
richard.townsendrose wrote:
> Hi all
>
> we have for years used ads. and have had no problem creating local
> tables for reports etc.
>
> once we are linked to the main data then i am getting a ADS 7040
> error. its all to do with rights .. and file not being created.
>
> i cannot even save a notepad file there ... tho it says its saved ...
>
> here is the code: using W7pro 64, build 2830
>
> richard
>
> ***************************************
> METHOD SetUp() CLASS CreateDbf
> // creating or opening SPOOL files
> LOCAL n AS DWORD
> LOCAL oSvr:=NULL_OBJECT AS dbserver
> LOCAL ulRetCode AS DWORD
> LOCAL hTable AS DWORD
> LOCAL hIndex AS DWORD
> LOCAL cWhat AS USUAL
> LOCAL lNeedCDXOnly:=FALSE AS LOGIC
>
> IF SysObject():lIPConnected // ! Empty(SysObject():GetSet(IPUser))
> AX_SetConnectionHandle( 0 )
> ENDIF
>
> DosError(0) // rgtr 050409
>
> BEGIN SEQUENCE
> // is spool dir available ?
> IF SELF:lSpool .AND. Empty(SysObject():GetSet(SpoolPath))
> SELF:TellStat('Spool Path not specified')
> BREAK 'NS'
> ELSEIF ! SELF:lSpool .AND. Empty(GetDefault())
> SELF:TellStat('No default directory')
> BREAK 'ND'
> ENDIF
>
> IF ! File(SELF:cFullName + '.dbf') // if no dbf, delete cdx and
> fpt
> IF File(SELF:cFullName + '.cdx')
> IF ! FErase(SELF:cFullName + '.cdx')
> SELF:TellStat('Unable to remove orphan index - Error:
> '+DosErrString(DosError()))
> BREAK 'DC'
> ENDIF
> ENDIF
> IF File(SELF:cFullName + '.fpt')
> IF ! FErase(SELF:cFullName + '.fpt')
> SELF:TellStat('Unable to remove orphan binary - Error:
> '+DosErrString(DosError()))
> BREAK 'DF'
> ENDIF
> ENDIF
> ELSE // have dbf
> IF SELF:lHasFPT .AND. ! File(SELF:cFullName + '.fpt') // missing
> fpt - delete all
> IF ! FErase(SELF:cFullName + '.dbf')
> SELF:TellStat('Unable to remove table missing binary - Error:
> '+DosErrString(DosError()))
> BREAK 'DT'
> ENDIF
> IF File(SELF:cFullName + '.cdx')
> IF ! FErase(SELF:cFullName + '.cdx')
> SELF:TellStat('Unable to remove index missing binary - Error:
> '+DosErrString(DosError()))
> BREAK 'DX'
> ENDIF
> ENDIF
> ELSE
> IF ALen(SELF:aIStru) > 0 .AND. ! File(SELF:cFullName + '.cdx')
> lNeedCDXOnly:=TRUE
> ENDIF
> ENDIF
> ENDIF
>
> // should either have all or none
> IF ! File(SELF:cFullName + '.dbf') .AND. ! File(SELF:cFullName +
> '.cdx')
>
> // use ads [B]
> IF lNeedCDXOnly
> ulRetCode:=AdsOpenTable90(0,String2Psz(SELF:cFullName+'.dbf'),
> NULL, ADS_CDX, ADS_ANSI,
> ADS_PROPRIETARY_LOCKING, ADS_IGNORERIGHTS, ADS_DEFAULT,
> NULL, @hTable)
> // hConnect AS DWORD, pucName AS PSZ, pucAlias
> AS PSZ, usTableType AS WORD, usCharType AS WORD, usLockType AS
> WORD, usCheckRights AS WORD, ulOptions AS DWORD, pucCollation AS
> PSZ, phTable REF DWORD
> ELSE
> ulRetCode:=AdsCreateTable90(0, String2Psz(SELF:cFullName
> +'.dbf'), NULL, ADS_CDX, ADS_ANSI,
> ADS_PROPRIETARY_LOCKING, ADS_IGNORERIGHTS, ADS_DEFAULT,
> String2Psz(SELF:cStru), ADS_DEFAULT, NULL,
> @hTable)
> //hConnection AS DWORD, pucName AS PSZ,
> pucDBObjName AS PSZ, usTableType AS WORD, usCharType AS WORD,
> usLockType AS WORD, usCheckRights AS WORD, usMemoSize AS WORD,
> pucFields AS PSZ, ulOptions AS DWORD, pucCollation AS PSZ,
> phTable REF DWORD )
> ENDIF
> IF ulRetCode == AE_SUCCESS
> IF lNeedCDXOnly
> SELF:TellStat('Created new Table')
> ELSE
> SELF:TellStat('Opened Table')
> ENDIF
> IF ALen(SELF:aIStru) > 0
> FOR n:= 1 TO ALen(SELF:aIStru)
> ulRetCode:=AdsCreateIndex90(hTable, String2Psz(SELF:cFullName
> +'.cdx'), String2Psz(SELF:cIndName + NTrim(n)),
> String2Psz(SELF:aIStru[n]), NULL, NULL,
> ADS_COMPOUND, ADS_DEFAULT, NULL, @hIndex)
> // hObj AS DWORD, pucFileName AS
> PSZ, pucTag AS PSZ, pucExpr AS
> PSZ, pucCondition AS PSZ, pucWhile AS PSZ, ulOptions AS
> DWORD, ulPageSize AS DWORD, pucCollation AS PSZ, phIndex REF DWORD
> IF ulRetCode == 0
> IF ulRetCode == 0
> SELF:TellStat('Created new Index')
> ELSE
> SELF:TellStat('Failed to create Index - Error: ' +
> NTrim(ulRetCode))
> BREAK 'BI'
> ENDIF
> NEXT
> ENDIF
> AdsCloseTable(hTable)
>
> ELSE
> IF lNeedCDXOnly
> SELF:TellStat('Failed to open Table - Error: ' +
> NTrim(ulRetCode))
> BREAK 'BO'
> ELSE
> SELF:TellStat('Failed to create Table - Error: ' +
> NTrim(ulRetCode))
> BREAK 'BT'
> ENDIF
> ENDIF
>
> ENDIF
>
> // test as should now have everything
> IF File(SELF:cFullName + '.dbf') .AND. IIF(ALen(SELF:aIStru)>0,
> File(SELF:cFullName + '.cdx'), TRUE) .AND. IIF(SELF:lHasFPT,
> File(SELF:cFullName + '.fpt'), TRUE)
> oSvr:=DbServer{SELF:cFullName+'.dbf', FALSE, FALSE}
> IF oSvr:Used
> SELF:TellStat('Table opened')
> ELSE
> SELF:TellStat('Failed to open Table') // - ' +
> oSvr:Status:Description)
> BREAK 'SO'
> ENDIF
> IF SELF:lClean
> oSvr:FLOCK()
> oSvr:zap()
> oSvr:UNLOCK()
> ENDIF
> ELSE
> SELF:TellStat('Lost Table')
> BREAK 'SN'
> ENDIF
>
> RECOVER USING cWhat
> DO CASE
> CASE cWhat == 'NS' // no spool
> CASE cWhat == 'ND' // no default
>
> CASE cWhat == 'DC' // cdx not deleted
> CASE cWhat == 'DF' // fpt not deleted
> CASE cWhat == 'DT' // dbf not deleted - missing fpt
> CASE cWhat == 'DX' // cdx not deleted - missing fpt
>
> CASE cWhat == 'BO'
> AdsCloseTable(hTable)
> CASE cWhat == 'BT'
> AdsCloseTable(hTable)
> CASE cWhat == 'BI'
> AdsCloseTable(hTable)
>
> CASE cWhat == 'SO' // failed to open
> oSvr:Close()
> oSvr:=NULL_OBJECT
> CASE cWhat == 'SN' // lost table
> oSvr:=NULL_OBJECT
> ENDCASE
>
> END SEQUENCE
>
> IF SysObject():lIPConnected // ! Empty(SysObject():GetSet(IPUser))
> AX_SetConnectionHandle( SysObject():hConnHandle )
> ENDIF
>
> RETURN oSvr
--
[toc] | [prev] | [next] | [standalone]
| From | "richard.townsendrose" <richard.townsendrose@gmail.com> |
|---|---|
| Date | 2011-05-18 08:17 -0700 |
| Message-ID | <96b652ca-2579-48b0-8821-15a27f993b4b@z15g2000prn.googlegroups.com> |
| In reply to | #1131 |
Dirk I am changing over to W7Pro 64. UAC seems to be a wholly undocumented mess. no where does windows help tell the averga epuntyer how to turn it on. it assumes that you are a munt and that there is a "systems administrator" thats the munt me so one is a circular f**k up from the start. typical piss poor programming. Do i have uAC turned off ... but frankly that seem not to work. Meanwhile i can tell you that ads is fantastic. anything you need please get in touch. we use the tdoc data dictionary [which feeds report pro using its standards] to create the ads data dictionary all programatically. but uac is doing my head in .. xp is so simple and co-operative in comparison. regards richard
[toc] | [prev] | [next] | [standalone]
| From | "Willie Moore" <williem@wmconsulting.com> |
|---|---|
| Date | 2011-05-18 11:01 -0500 |
| Message-ID | <ir0qh8$7ue$1@speranza.aioe.org> |
| In reply to | #1132 |
Richard, UAC is located on control panel, user and family, user accounts, change user access control settings. Regards, Willie "richard.townsendrose" wrote in message news:96b652ca-2579-48b0-8821-15a27f993b4b@z15g2000prn.googlegroups.com... Dirk I am changing over to W7Pro 64. UAC seems to be a wholly undocumented mess. no where does windows help tell the averga epuntyer how to turn it on. it assumes that you are a munt and that there is a "systems administrator" thats the munt me so one is a circular f**k up from the start. typical piss poor programming. Do i have uAC turned off ... but frankly that seem not to work. Meanwhile i can tell you that ads is fantastic. anything you need please get in touch. we use the tdoc data dictionary [which feeds report pro using its standards] to create the ads data dictionary all programatically. but uac is doing my head in .. xp is so simple and co-operative in comparison. regards richard
[toc] | [prev] | [next] | [standalone]
| From | "Paul D B" <polleke@NOMORESPAMhnt.be> |
|---|---|
| Date | 2011-05-19 09:22 +0200 |
| Message-ID | <4dd4c51d$0$14255$ba620e4c@news.skynet.be> |
| In reply to | #1127 |
Hi Richard, where do you create the local data? I mean what directory? You are aware that in Vista/W7 there are several protected areas (e.g. everything under "Program Files" is protected against changes made by running programs)? In fact: the rule says: "Your program should not write temporary files (or anything else for that matter) to the program directory. Any program should use %TEMP% for temporary files and %APPDATA% for user specific application data". Of course it is easy to get around this by installing your program in a folder in the root. I have made a folder "c:\XP-Programs" where I put all "older" applications. Another workaround seems to be to rename your program into something with "setup" in it. Because installers do have the rights to write into the Program Folder (because they will run with admin privileges) E.g. rename TDOC.EXE into TDOC-SETUP.EXE and see what happens. (Not tested this trick myself) (BTW, this gives a good idea about how clumsy Microsoft implemented this "Program Files Protection". So far for protection against malware... Paul "richard.townsendrose" schreef in bericht news:ea579f0b-c6a9-49f0-ae43-693b1b3b70e7@p13g2000yqh.googlegroups.com... Hi all we have for years used ads. and have had no problem creating local tables for reports etc. once we are linked to the main data then i am getting a ADS 7040 error. its all to do with rights .. and file not being created. i cannot even save a notepad file there ... tho it says its saved ... here is the code: using W7pro 64, build 2830 richard
[toc] | [prev] | [next] | [standalone]
| From | "richard.townsendrose" <richard.townsendrose@gmail.com> |
|---|---|
| Date | 2011-05-22 05:11 -0700 |
| Message-ID | <ad0c4c2d-b8c2-409e-8bee-c079a2ba05fa@f11g2000vbx.googlegroups.com> |
| In reply to | #1134 |
Paul The normal installation directory is C:\TDOC5 where software goes into \SYSTEM, temp files into \SPOOLS and stuff for importing goes into \TEMP. These defaults are automatically created in the installer and configured in the tdoc.ini file which lives with the software in \System, tho we recommend for most people that they create \spools and \temp in "My Documents" somewhere. I am entertained to note that "c: \documents and settings\" has become "c:\users" ... almost sensible Even if i "run as administrator" on a remote dataset - the spool files fail to create If i run on a local data set - then the spools are created ok. all worked fine in XP thus it is to do with WIN7 and ADS - and my guess is that the AX_SetConnectionHandle( 0 ) seems NOT to clear the driver. so some more experimentation is required. i am using ADS 9.1 as I still have one user who refuses to upgrade to 10. dont think they ever will ... more likely to go out of business if that is a bug that is fixed, then tough ... 10 it will be. richard
[toc] | [prev] | [next] | [standalone]
| From | "Markus Lorenzi" <lo5ren23zi@modul65ine.ch> |
|---|---|
| Date | 2011-05-22 21:45 +0200 |
| Message-ID | <irbptr$5p7$1@speranza.aioe.org> |
| In reply to | #1140 |
Hi Richard it looks to me like the SMB2 problem. Check out this post from the ads Newsgroups: Hi When accessing temp (indexed) tables or after re-indexing a table using ADS on a Windows 7 or 2008 server from a Windows 7 client - we experience file not found because the newly created index is not visible to ADS even though it can be seen via explorer. We have had this problem for a while now, I originally raised it in May this year and had a discussion with Edgar Sherman about it. He, in fact provided me with a registry workaround that has served us well. I didn't pursue it then because no-one else reported the problem and I thought it might have been something peculiar to our system. However, the issue has raised its head again reported by Nick Friend last week in comp.lang.clipper.visual-objects forum - another VO developer. (I provided the following following registry tweak, and Nick reported that fixed his issue as well) This is set on the client only........ [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LanmanWorkstation\Parameters] "FileInfoCacheLifetime"=dword:00000000 "FileNotFoundCacheLifetime"=dword:00000000 "DirectoryCacheLifetime"=dword:00000000 I can re-create (and fix with the above registry tweak) this issue on Win Server 2008 and peer to peer server Windows 7 from a Windows 7 client using all 3 versions of ADS, v8, v9, v10 There was some conjecture that it might be resolved by turning off Rights Checking, but this made no difference, the only solution has been the registry fixes. We are using VO 2.8 with version 8.10.0.26 of ace32.dll & adsadt.rdd - could it perhaps be an RDD issue? We are stuck with using v8 ace & rdd until we can move all our clients to v10 - scheduled for completion by April 2011 To ensure that this doesn't affect our clients, I have added an operating system check into the client setup process that automatically adds the 3 reg keys if it finds Windows 7 - not pretty but it works! How best to proceed from here with getting this checked out? Do I contact support direct or via my local distributor? -- regards Jon Justin "richard.townsendrose" <richard.townsendrose@gmail.com> schrieb im Newsbeitrag news:ad0c4c2d-b8c2-409e-8bee-c079a2ba05fa@f11g2000vbx.googlegroups.com... > Paul > > The normal installation directory is C:\TDOC5 where software goes into > \SYSTEM, temp files into \SPOOLS and stuff for importing goes into > \TEMP. These defaults are automatically created in the installer and > configured in the tdoc.ini file which lives with the software in > \System, tho we recommend for most people that they create \spools and > \temp in "My Documents" somewhere. I am entertained to note that "c: > \documents and settings\" has become "c:\users" ... almost sensible > > Even if i "run as administrator" on a remote dataset - the spool files > fail to create > > If i run on a local data set - then the spools are created ok. > > all worked fine in XP > > thus it is to do with WIN7 and ADS - and my guess is that the > AX_SetConnectionHandle( 0 ) seems NOT to clear the driver. so some > more experimentation is required. i am using ADS 9.1 as I still have > one user who refuses to upgrade to 10. dont think they ever will ... > more likely to go out of business > > if that is a bug that is fixed, then tough ... 10 it will be. > > richard
[toc] | [prev] | [next] | [standalone]
| From | "Jon J" <j@j> |
|---|---|
| Date | 2011-05-23 10:44 +1000 |
| Message-ID | <4dd9adf8$0$18321$c30e37c6@pit-reader.telstra.net> |
| In reply to | #1140 |
Richard I think Markus is correct, I almost posted his answer on Friday, but was distracted and didn't get around to it. It only occurs when the server and the workstation use SMB2 - i.e. Windows server 2008 and Windows 7, but it doesn't have to be a server, a small LAN with Windows 7 as the file server are also affected. As you said, it doesn't occur on XP because XP doesn't use SMB2. The Registry fix will solve it, but the culprit turned out to be the IF FILE() statement It has to do with more aggressive caching using SMB2 and the use of 3rd party (non Advantage) I/O processes like the FILE() statement. We solved it (and were able to get rid of the registry tweak) by not using IF FILE() in the situation where we created indexes and then immediately checked if they were there before attempting to Open the table Someone else solved it by putting a delay between the create and the IF FILE() to give the cache time to catch up. If you try the registry tweak first and that solves the issue, then you can either stick with that or re-work your code to get around it. Check out the Advantage.Visual_Objects newsgroup about October last year -- regards Jon Justin "richard.townsendrose" <richard.townsendrose@gmail.com> wrote in message news:ad0c4c2d-b8c2-409e-8bee-c079a2ba05fa@f11g2000vbx.googlegroups.com... > Paul > > The normal installation directory is C:\TDOC5 where software goes into > \SYSTEM, temp files into \SPOOLS and stuff for importing goes into > \TEMP. These defaults are automatically created in the installer and > configured in the tdoc.ini file which lives with the software in > \System, tho we recommend for most people that they create \spools and > \temp in "My Documents" somewhere. I am entertained to note that "c: > \documents and settings\" has become "c:\users" ... almost sensible > > Even if i "run as administrator" on a remote dataset - the spool files > fail to create > > If i run on a local data set - then the spools are created ok. > > all worked fine in XP > > thus it is to do with WIN7 and ADS - and my guess is that the > AX_SetConnectionHandle( 0 ) seems NOT to clear the driver. so some > more experimentation is required. i am using ADS 9.1 as I still have > one user who refuses to upgrade to 10. dont think they ever will ... > more likely to go out of business > > if that is a bug that is fixed, then tough ... 10 it will be. > > richard
[toc] | [prev] | [next] | [standalone]
| From | "richard.townsendrose" <richard.townsendrose@gmail.com> |
|---|---|
| Date | 2011-05-23 08:55 -0700 |
| Message-ID | <cef4f822-350d-44b3-bc39-9216f07a1b98@a10g2000vbz.googlegroups.com> |
| In reply to | #1144 |
jon, markus my server is actually smb 2003 sp 2 the line of code that fails is ulRetCode:=AdsCreateTable90(0, String2Psz(SELF:cFullName +'.dbf'), NULL, ADS_CDX, ADS_ANSI, ADS_PROPRIETARY_LOCKING, ADS_IGNORERIGHTS, ADS_DEFAULT, String2Psz(SELF:cStru), ADS_DEFAULT, NULL, @hTable) and it fails with a 7040 error - An error occurred when attempting to create a table or an index file. so that means that the IF FILE(..) is NOT the culprit also if i stop the ADS service on the server - then hey presto, creation of local tables works. so it is something to do with the interaction between (ADS remote or ADS internet) and W7 am about to try the registry fix. but that is NOT a decent fix ... richard
[toc] | [prev] | [next] | [standalone]
| From | "richard.townsendrose" <richard.townsendrose@gmail.com> |
|---|---|
| Date | 2011-05-23 09:40 -0700 |
| Message-ID | <290a5f8f-5ef9-4f8b-84fc-7fd340a38e9e@gu8g2000vbb.googlegroups.com> |
| In reply to | #1148 |
jon, markus and sad to say that the registry fix on the user pc does NOT work - i rebooted the user pc. it is FILE CREATION that is the problem. I also tried DBCreate and that fails ... i guess its the ads version anyway. richard
[toc] | [prev] | [next] | [standalone]
| From | "Willie Moore" <williem@wmconsulting.com> |
|---|---|
| Date | 2011-05-24 06:39 -0500 |
| Message-ID | <irg5d9$fho$1@speranza.aioe.org> |
| In reply to | #1149 |
Richard, Have you checked with advantage support? They have always been very responsive to me. Regards, Willie "richard.townsendrose" wrote in message news:290a5f8f-5ef9-4f8b-84fc-7fd340a38e9e@gu8g2000vbb.googlegroups.com... jon, markus and sad to say that the registry fix on the user pc does NOT work - i rebooted the user pc. it is FILE CREATION that is the problem. I also tried DBCreate and that fails ... i guess its the ads version anyway. richard
[toc] | [prev] | [next] | [standalone]
| From | "richard.townsendrose" <richard.townsendrose@gmail.com> |
|---|---|
| Date | 2011-05-24 05:54 -0700 |
| Message-ID | <5d556bbe-fa56-482e-a21e-795da8321748@w36g2000vbi.googlegroups.com> |
| In reply to | #1155 |
Willie
ADS Support monitor this ng anyway .. so if its a simple one they will
respond here.
it seems a bit more complex than being simply a rights issue.
i simply dont know how to give "a program" rights - in file manager
[for thats what it is] one can right click the exe and give everyone
all rights, you can tell windows to run it in xp sp3 mode, you can
"run as administrator" none of which makes the blindest difference.
the problem is this:
a) i have a database of 47 tables which can be accessed by one of
three modes
a1) tables locally
a2) tables on a server under ads remote
a3) tables on a server with a data dictionary under ads internet OR
ads remote.
for integrity checking reasons it seems to me to be daft to to use ads
remote with a data dictionary, except when administering ... and then
only to delete it if it or a table is knackered.
b) i use extract tables for complex reports and so on.
b1) these are created locally on the pc and have been for many years.
code posted previously.
suddenly in win 74 pro 64 ... ads error 7040 on creation WHEN in the
a2 or a3 situation.
interestingly, if one has an a2 or a3 failure, and tries an a1, then
it then FAILS as well, and the only way to fix that is to reboot.
although the vo installation itself was just "copied" from my xp
machine, the programs for operation including special versions were
all ibstalled by an installer. and the problems are identical
so i have to conclude that ADS is reacting adversely to Win 7 pro 64
another firm who are a major ads users and who use quite a lot of my
code but not for creation of temporary files use instead:
fTmpFile := dbFileSpec{}
fTmpFile:Create(cFileName,aStruct,"DBFCDX",TRUE)
it seems to me to be bad practice to mix rdd's in the same app ...
but may be that is what i will have to do unless ads come up with an
answer.
richard
[toc] | [prev] | [next] | [standalone]
| From | "richard.townsendrose" <richard.townsendrose@gmail.com> |
|---|---|
| Date | 2011-05-29 03:25 -0700 |
| Message-ID | <8940f0d0-7796-48b9-b256-c41b7ced7835@h7g2000yqa.googlegroups.com> |
| In reply to | #1158 |
Hi all Still not solved. but sinece ADSCreateTable71, we have ulOptions: The manual says: ADS_DEFAULT: No options bit is set. When this value is used as the option and the connection is a database connection, the newly created table may be either a database table or a free table depending on the capability of the connected user. If the connected user is ADSSYS, the newly create table is a database table. If the connected user is not the ADSSYS user, the newly created table is a free table. This is what is NOT working. ADS_DICTIONARY_BOUND_TABLE: The newly created table should be part of the data dictionary. The connection handle must be a database connection and the user must have been granted the CREATE TABLE permission in the database. An AE_PERMISSION_DENIED error will be returned if the user does not have the permission to create a table in the database. This bit cannot be OR'ed with the ADS_FREE_TABLE or the ADS_TEMP_TABLE bits. ADS_FREE_TABLE: The newly created table should not be part of the data dictionary. This bit cannot be OR'ed with the ADS_DICTIONARY_BOUND_TABLE bit. This option is required for an ADSSYS user to create a free table. This doesn't work either ... ADS_TEMP_TABLE: The newly created table is a temporary table that is only available on the current connection. This bit cannot be OR'ed with the ADS_DICTIONARY_BOUND_TABLE bit. See Temporary Tables for more information. When this option is used, the pucName will be the name of the temporary table and it will have no relation to the names of the physical files created by Advantage. Advantage will choose the appropriate location to store the physical files and will delete the files when the connection is closed. have yet to play with this one. anyone lese any other ideas. have a good week end ... glasgow is 10c and very wet and windy ... may be better later today richard
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web