Discussion:
dhRichClient transactions
(too old to reply)
Phil McFarlane
2010-03-10 23:34:43 UTC
Permalink
With my current project I need to do a series of
db updates to different tables within a
transaction on a rpcConnection. I have tried to
work out how this can be done but have made no
progress.

Any help or examples would be appreciated.

phil_mac
Schmidt
2010-03-11 10:28:16 UTC
Permalink
Post by Phil McFarlane
With my current project I need to do a series of
db updates to different tables within a
transaction on a rpcConnection. I have tried to
work out how this can be done but have made no
progress.
Any help or examples would be appreciated.
You will need to do this at the serverside, since
the communication with the DB over the dhRPC-
functions is really "connectionless" (of course you
have socket-connections - but what I mean is,
that there is no permanent DB-connection to a
'DB-cConnection-Object' at the clientside).

So, please transfer everything you need (some
serialized cRecordsets - or "Raw-Data" in some
format of your choice (a CSV-String or your own
"String-Format", or XML - or a serialized cCollection)
to the serverside over a new written Function - and
then process the transaction within the code of this
new serverside Method.

And BTW, the SQLite-engine has (since one year or so)
nested transaction-support built in, in case you need that...

Regards,

Olaf
Phil McFarlane
2010-03-11 11:42:24 UTC
Permalink
Olaf

I understand (I think)from your reply that I will
need to move my record sets to the server and
complete a transaction on the server. How to do
this is my problem. My previous experience with
DAO and Access is of no help and I am unsure how
to proceed. If you know of any examples that would
help they would be appreciated.

Thanks

Phil
Post by Schmidt
Post by Phil McFarlane
With my current project I need to do a series of
db updates to different tables within a
transaction on a rpcConnection. I have tried to
work out how this can be done but have made no
progress.
Any help or examples would be appreciated.
You will need to do this at the serverside, since
the communication with the DB over the dhRPC-
functions is really "connectionless" (of course you
have socket-connections - but what I mean is,
that there is no permanent DB-connection to a
'DB-cConnection-Object' at the clientside).
So, please transfer everything you need (some
serialized cRecordsets - or "Raw-Data" in some
format of your choice (a CSV-String or your own
"String-Format", or XML - or a serialized cCollection)
to the serverside over a new written Function - and
then process the transaction within the code of this
new serverside Method.
And BTW, the SQLite-engine has (since one year or so)
nested transaction-support built in, in case you need that...
Regards,
Olaf
Schmidt
2010-03-11 18:57:13 UTC
Permalink
Post by Phil McFarlane
I understand (I think)from your reply that I will
need to move my record sets to the server and
complete a transaction on the server. How to do
this is my problem. My previous experience with
DAO and Access is of no help and I am unsure how
to proceed. If you know of any examples that would
help they would be appreciated.
In Oct. 2009 we had a short discussion about recompiling
the small DBServer.dll which hosts the basic-functionality"
for Remote SQLite-communication (containing only a few small
functions in one single, serverside Class cDBAccess.cls).
This thread also contained a suggestion, to switch-on the
dhRPC-DebugMode for your further (much more easy)
enhancements on the function-set within that DBServer.dll ...

Here's the thread again:
http://groups.google.de/group/microsoft.public.vb.database/browse_thread/thread/59f397e6bb7b58e0/2a899212d662a15c

So it would be great, if you could try to make the appropriate
efforts, to manage your first "fully debuggable Server-Code-
Rountdtrip" against the DBServer.dll-*Project* again.
Maybe starting with one of the smaller Functions which are
already built in (e.g. Step-By-Step debugging of the retrieval
of a simple, small Recordset from the serverside DB).


If you are beginning to "feel familiar" with that Debug-Mode
again, we should talk about new serverside Functions
(Methods) within the cDBAccess-Class of DBServer.dll.

Just ask, if you have more questions with regards to these
Debugging-preparations ... if you have it running, you
could already try, to implement something very simple
yourself - as for example in the cDBAccess.cls:

Public Function Reflect(S As String) As String
Reflect = StrReverse(S)
End Function

Then add the necessary clientside "wrapper-call" into
your Main-Exes Private Class, which is responsible
for the RPC-Calls - and try to use this new call
from your GUI - start in Debug-Mode first - and then
maybe also in "compiled mode", by placing the
recompiled Dll again in your Server-Directory.

If you managed, to "successfully reflect strings" ;-),
(your "Debug-Recompile-Test-workflow") again
refreshed in your mind, then adding a Public Function
which handles serverside DB-transactions should be
no larger problem anymore...

Olaf

Loading...