Showing posts with label manually. Show all posts
Showing posts with label manually. Show all posts

Friday, March 30, 2012

Resolver Issues

I'm not able to resolve conflicts using the conflict viewer because I have
timestamp columns in my tables. Can I manually resolve these conflicts by
making the necessary changes to the data?
I'm using filters on my articles and I'm noticing that replication is
changing rows in the table that don't meet my filter clause. Well, all
the data didn't change in the row just the Last_Update_Date and
Last_Update_By columns changed. I have a trigger on my tables that
updates these columns. For some reason my trigger is getting fired.
These two columns get updated so replication thinks it needs to push these
changes along to the subscriber. I end up with conflicts if the
subscriber has also changed these rows.
The first thing to figure out is what is causing teh triggers to fire.
As far as manually doing this, you can. The conflict viewer is just another
application which sits over a set of data. You can easily do this yourself.
You can freely read/write to the conflict tables if you choose since the
only things which reads from them is the conflict viewer. If you choose,
you can write your own application to replace the conflict viewer in order
to fit it into your environment and tailor it to your needs.
Mike
Principal Mentor
Solid Quality Learning
"More than just Training"
SQL Server MVP
http://www.solidqualitylearning.com
http://www.mssqlserver.com
|||I figured out my trigger issue.
I appreciate your help.
"Michael Hotek" <mhotek@.nomail.com> wrote in message
news:O4wRnlLKEHA.620@.tk2msftngp13.phx.gbl...
> The first thing to figure out is what is causing teh triggers to fire.
> As far as manually doing this, you can. The conflict viewer is just
another
> application which sits over a set of data. You can easily do this
yourself.
> You can freely read/write to the conflict tables if you choose since the
> only things which reads from them is the conflict viewer. If you choose,
> you can write your own application to replace the conflict viewer in order
> to fit it into your environment and tailor it to your needs.
> --
> Mike
> Principal Mentor
> Solid Quality Learning
> "More than just Training"
> SQL Server MVP
> http://www.solidqualitylearning.com
> http://www.mssqlserver.com
>

Saturday, February 25, 2012

Repost of VB Run-time error '3211'

I'm reposting this because i tried deleteing the table manually and
recreating it manually. It works OK after that, but when i try it again, it
gives the error again. There are four tables, but it only happens on the
"ITEMS" table.
I'm trying to execute the following code and i am getting this error:
"Run-time error '3211'; The database engine could not lock table 'Items'
becuase it is already in use by another person or process".
This code is being executed in AccessXP using an ODBC connection to a server
DB. I'm not sure exactly which statement it is giving the error on.
All other computers were turned off and the one computer was restarted, but
we still get the error. The table is not being used by a form.
Any help would be greatly appreciated.
Tony
========================================
====================================
=================================
CurrentDb.Execute "DROP TABLE Items"
DoCmd.TransferDatabase acImport, "ODBC Database", _
" ODBC;DSN=DEMO2ENG;ArrayFetchOn=1;ArrayBu
fferSize=8;DBQ=DEMO2ENG;OpenMode=0;
DecimalSymbol=.;;TABLE=Items", _
acTable, "Items", "Items"
CurrentDb.Execute "CREATE UNIQUE INDEX ItemNumIdx ON Items (ItemNumber)"How can you not be sure what statement is giving the error? Add a msgbox
before each statement :-)
Two ideas - neither of which might be the cause, but they would be easy to
check:
(1) Is "items" a reserved word in Access? (I do not have it here to check.)
If so, try [Items].
(2) Try caching the currentdb reference: (You should really do this anyway)
dim db as database
set db = currentdb()
' do things with db, not currentdb().
set db = nothing
HTH,
TC
"Tony Girgenti" <antoniongirgenti@.comcast.net> wrote in message
news:OeD2wd04DHA.2772@.TK2MSFTNGP09.phx.gbl...
quote:

> I'm reposting this because i tried deleteing the table manually and
> recreating it manually. It works OK after that, but when i try it again,

it
quote:

> gives the error again. There are four tables, but it only happens on the
> "ITEMS" table.
> I'm trying to execute the following code and i am getting this error:
> "Run-time error '3211'; The database engine could not lock table 'Items'
> becuase it is already in use by another person or process".
> This code is being executed in AccessXP using an ODBC connection to a

server
quote:

> DB. I'm not sure exactly which statement it is giving the error on.
> All other computers were turned off and the one computer was restarted,

but
quote:

> we still get the error. The table is not being used by a form.
> Any help would be greatly appreciated.
> Tony
>

========================================
====================================[QUO
TE]
> =================================
> CurrentDb.Execute "DROP TABLE Items"
> DoCmd.TransferDatabase acImport, "ODBC Database", _
>[/QUOTE]
" ODBC;DSN=DEMO2ENG;ArrayFetchOn=1;ArrayBu
fferSize=8;DBQ=DEMO2ENG;OpenMode=0;[QUOT
E]
> DecimalSymbol=.;;TABLE=Items", _
> acTable, "Items", "Items"
> CurrentDb.Execute "CREATE UNIQUE INDEX ItemNumIdx ON Items[/QUOTE]
(ItemNumber)"|||"Tony Girgenti" <antoniongirgenti@.comcast.net> wrote in message
news:OeD2wd04DHA.2772@.TK2MSFTNGP09.phx.gbl...
quote:

> I'm reposting this because i tried deleteing the table manually and
> recreating it manually. It works OK after that, but when i try it again,
it
> gives the error again. There are four tables, but it only happens on the
> "ITEMS" table.
> I'm trying to execute the following code and i am getting this error:
> "Run-time error '3211'; The database engine could not lock table 'Items'
> becuase it is already in use by another person or process".
> This code is being executed in AccessXP using an ODBC connection to a serv
er
> DB. I'm not sure exactly which statement it is giving the error on.
> All other computers were turned off and the one computer was restarted, bu
t
> we still get the error. The table is not being used by a form.
> Any help would be greatly appreciated.
> Tony
> ========================================
==================================
==
> =================================
> CurrentDb.Execute "DROP TABLE Items"
> DoCmd.TransferDatabase acImport, "ODBC Database", _
> " ODBC;DSN=DEMO2ENG;ArrayFetchOn=1;ArrayBu
fferSize=8;DBQ=DEMO2ENG;OpenMode=
0;
> DecimalSymbol=.;;TABLE=Items", _
> acTable, "Items", "Items"
> CurrentDb.Execute "CREATE UNIQUE INDEX ItemNumIdx ON Items (ItemNumber
)"
>
>

Hi Tony,
I am assuming you did not want to *link* to
the SQL table?
Would you mind changing your local table
name to "tblItems" then try the following:
'--
Dim strSQL As String
Debug.Print "About to delete table."
CurrentDb.Execute "DROP TABLE tblItems", dbFailOnError
Debug.Print "Have deleted table."
strSQL = "SELECT Items.* INTO tblItems " _
& "FROM Items IN '' [ODBC;DSN=DEMO2ENG;DATABASE=];"
Debug.Print "Make table query: " & vbCrLf & strSQL
CurrentDb.Execute strSQL, dbFailOnError
Debug.Print "Have executed make table."
Debug.Print "About to create index."
strSQL = "CREATE UNIQUE INDEX ItemNumIdx ON tblItems (ItemNumber);"
CurrentDb.Execute strSQL, dbFailOnError
Debug.Print "Have created index."
'--
{from tip provided by John Viescas}
To see what needs to go in between the brackets,
temporarily link to remote table "Items," then in
Immediate Window type the following:
?CurrentDb.Tabledefs("Items").Connect
Place whatever this returns inside the brackets,
then delete link to "Items."
Please respond back if I have misunderstood.
Good luck,
Gary Walter|||Tony,
It is not considered to be polite to cross-post the same question to several
news groups, because of this your message is ignored by many skilled news
group readers. And then again resending the same question over and over
again is even more rude.
Regards,
"Tony Girgenti" <antoniongirgenti@.comcast.net> wrote in message
news:OeD2wd04DHA.2772@.TK2MSFTNGP09.phx.gbl...
I'm reposting this because i tried deleteing the table manually and
recreating it manually. It works OK after that, but when i try it again, it
gives the error again. There are four tables, but it only happens on the
"ITEMS" table.
I'm trying to execute the following code and i am getting this error:
"Run-time error '3211'; The database engine could not lock table 'Items'
becuase it is already in use by another person or process".
This code is being executed in AccessXP using an ODBC connection to a server
DB. I'm not sure exactly which statement it is giving the error on.
All other computers were turned off and the one computer was restarted, but
we still get the error. The table is not being used by a form.
Any help would be greatly appreciated.
Tony
========================================
====================================
=================================
CurrentDb.Execute "DROP TABLE Items"
DoCmd.TransferDatabase acImport, "ODBC Database", _
" ODBC;DSN=DEMO2ENG;ArrayFetchOn=1;ArrayBu
fferSize=8;DBQ=DEMO2ENG;OpenMode=0;
DecimalSymbol=.;;TABLE=Items", _
acTable, "Items", "Items"
CurrentDb.Execute "CREATE UNIQUE INDEX ItemNumIdx ON Items (ItemNumber)"