Re: Removing .db file entry for PUBLIC item
- From: "K. S. Huang" <k_Underln_s_Underln_huang_AT_yahoo_DOT_com>
- Date: Wed, 31 Oct 2007 17:01:56 -0700
I was using this batch file command to tweak the datasync.db
@echo off
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
set __RECORD=
if exist datasync_tweak.db del datasync_tweak.db
for /f "tokens=1,* eol=" %%i in (datasync.db) do (
REM echo %%i%%j
if /i "%%i" EQU "RECORD" (
set __RECORD=""
) else if /i "%%i" EQU "RECORD:" (
set __RECORD=""
)
if defined __RECORD (
set __RECORD=!__RECORD! "%%i%%j"
if /i %%i EQU END (
echo !__RECORD! | findstr /I /C:"repllog\.exe" >nul
if !ERRORLEVEL! NEQ 0 (
for %%a in (!__RECORD!) do (
if "%%~a" NEQ "" echo %%~a>> datasync_tweak.db
)
) else (
echo tweak Repllog Record.
)
set __RECORD=
)
) else (
echo %%i %%j>> datasync_tweak.db
)
)
endlocal
copy datasync_tweak.db datasync.db >nul
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:%23kZoOO$GIHA.4228@xxxxxxxxxxxxxxxxxxxxxxx
Yep, that's a possibility. For now, I'm using my own 'datasync
replacement' project (no actual source built; just a place to have the
build system visit after sysgen has copied the original file from PUBLIC).
When I add that to the workspace, it uses a build rule (in makefile.inc),
and a suitable entry in the SOURCES file, to cause its own datasync.db to
be copied over the top of the PUBLIC one in the flat release folder.
I hate to have to back-door all of these things, but for now, I haven't
found any problems with this scheme.
Paul T.
"Dean Ramsier" <ramsiernospam@xxxxxxxxxx> wrote in message
news:%23KL6ig%23GIHA.4196@xxxxxxxxxxxxxxxxxxxxxxx
In this case, the only thing in the datasync.db file is the replog stuff,
I suppose you could just delete it in premakimg.bat...
--
Dean Ramsier - eMVP
BSQUARE Corporation
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam
DOT com> wrote in message news:OUSpsW9GIHA.5228@xxxxxxxxxxxxxxxxxxxxxxx
Unfortunately, for a DB file, there's no single line or string that you
can search for to remove "all repllog entries". When you run that
command, you're left with an invalid record entry in the DB file. The
concept is good; I'm just not sure that, without knowing the format of
the DB file, you can adequately reprocess it.
Paul T.
"Tarun" <tarun.nigam@xxxxxxxxx> wrote in message
news:1193814912.466056.273310@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Agree with Bruce: You can strip out auto-notify entries using
premakeimg.bat.
Here's how: The following lines in premakeimg.bat should suffice:
findstr /v "repllog.exe AppRunAtRs232Detect" datasync.db > temp.db
copy /A temp.db datasync.db
On Oct 30, 3:56 am, "Bruce Eitman [eMVP]"
<beitman.nos...@xxxxxxxxxxxxxxxxxxxxxx> wrote:
You could also strip it out with a premakeimg.bat script.
--
Bruce Eitman (eMVP)
Senior Engineer
beitman AT applieddata DOT net
Applied Data Systems
www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member
"Dean Ramsier" <ramsiernos...@xxxxxxxxxx> wrote in message
news:eB5CGclGIHA.4476@xxxxxxxxxxxxxxxxxxxxxxx
The entry in the .db file just serves to initialize the system
database.
You could run a little snippet of code to look for that entry and
remove
it during system init. I haven't actually done it so I don't know
exactly
how, but it should be possible. The functionality might go in a
standard
little app that undoes every other automatic thing that you didn't
actually want...
--
Dean Ramsier - eMVP
BSQUARE Corporation
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no
spam DOT
com> wrote in messagenews:eQVr8AlGIHA.284@xxxxxxxxxxxxxxxxxxxxxxx
Hi,
I'm looking for any creative solutions that you might have found to
the
following problem:
I have ActiveSync in my build, but do not want it to start
automatically
every time there is an RS232 connect event (this is annoying and
does not
fit the usage model of our device; manual start is fine, when
ActiveSync
is to be used). This is all well and good, but when you include
ActiveSync in the configuration, you *always* get datasync.db
included in
your image and that *always* puts the database entries to start
ActiveSync in the notification database. The help page for
ActiveSync
says, "If you do not need AutoNotify, remove this entry.", but that
was
obviously written by someone who has never used PB in the real
world. I
shouldn't modify PUBLIC, as I don't want to prevent *every* device
that I
might build from having this feature, just the ones that I choose.
Unlike registry files, there does not appear to be a way to
indicate that
a given entry should be removed from the database via some .db file
that
I create (or via entries added to project.db or something easy and
sensible).
So, I could somehow forcably copy my own datasync.db over the top
of the
one from ActiveSync found in the flat release directory, or I could
edit
the PUBLIC code to remove the AutoNotify entry and assume that I'll
remember to put it in my own .db file on any device that *should*
have
it.
Other solutions?
Paul T.- Hide quoted text -
- Show quoted text -
.
- Prev by Date: Re: Hardware Access from Application
- Next by Date: Insert an intermediate driver on the top of the serial port driver.
- Previous by thread: Re: Hardware Access from Application
- Next by thread: Insert an intermediate driver on the top of the serial port driver.
- Index(es):