 |
|
|
 |
|
 |
hi, everyone when i am trying this codes,i met a problem . i compiled these codes with vs 2005,and debug it with Activesync 4.x and Windows Mobile 2005
the code is as following:
CAdoFiltr* pAdoFiltr = CAdoFiltr::getInstance(); HRESULT hr = pAdoFiltr->DesktopToDevice("d:\\test.mdb", "", FALSE, TRUE, "\\My cuments\\test.cdb"); if (hr != S_OK) { MessageBox("error"); }
when i tried to overwrite the file test.cdb with this code, i got a return value: hr = 0x80070020 this file is being used by another program,process can not access it。; and overwriting failed. how can I solve this problem ?
please help!!
regards!
-- modified at 10:20 Wednesday 11th October, 2006
|
| Sign In·View Thread·PermaLink | 1.33/5 (3 votes) |
|
|
|
 |
|
 |
Hi, when I use Devicetodesktop and Desktoptodevice with Activesync 3.7 and Windows Mobile 2003, all works fine. But if I use the same code with Activesync 4.x and Windows Mobile 2005 I have the error -2147024893 returned by Desktoptodevice. It means that "System cannot find the path specified", but it isn't true. How can I solve this problem ?
Rita
|
| Sign In·View Thread·PermaLink | 1.75/5 (3 votes) |
|
|
|
 |
|
|
 |
|
 |
To use Seek() on WinCE Device(Jornada720), i first call put_index(bstr NameOfIndex). If the index(primary key) is on 1 column, Seek() works fine, but if the index is on more than one column, passing parameter with variant array with key values returns me hr = -2147024809(The parameter is incorrect), although the same code workes fine on Desktop. Is there any difference in using Seek() on one or more indexed columns?
wefergrtgrtvrtrt rtrtb brt
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
Ok I looked up the design pattersn website, and it all very interesting, cool way of ensuring that only one instance of the object is ever created.
My only comment would be that, I can't see when the instance gets deleted, is this a memory leak ?
I can't delete the object because the destructor is protected, is their something going on here I don't see. ?
Regards
Ray
"Je Suis Mort De Rire"
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
U have a very valid point there... For garbage collected languages like Java this pattern fits in pretty well, since the garbage collector does the memory freeing.
Unfortunately, for C++, if I'm correct, you'll need to do reference counting and free the memory when appropriate, kinda like smart pointers in com.
Tanzim Husain
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
you can create a function in the file AdoFiltr.cpp and call it in your program after you used the instance...
//AdoFiltr.cpp //customized - beginning void CAdoFiltr::deleteInstance() { if (CAdoFiltr::s_pSelf != NULL) delete s_pSelf; } //customized - end
//your program pAdoFiltr->deleteInstance();
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Is this code should work in eMbedded VC++? if so the it do not for me because he go look in the registry in my pocket PC 2002 and I don't think he should look there, is there a way to make him look in the right one or I should use VC++ to trasfert my DB?
thank
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
hi everyone
first i would like to thanks people who help me during my placement, I had to implement a timesheet software on Pocket PC.
now i have got to do a project which use both an iPAQ H3800 and a PC On the PC there is an Access database and i must send several records to my pocket pc i must add, delete and maybe modify records using the pocket pc and when i have finished i must add the new records or modify old records into the database of the pc
My programing software is Microsoft Embedded Visual C++ 3.0 and ActyveSync version is 3.5
step by step :
1. i modify the general database on the PC 2. i must send a part of this database to the pocket pc 3. i must be able to add, modify or delete records into the embedded database 4. i must synchonise records between embedded and general database in order to use records later
do i have to use activesync in order to synchronize the two databases and how?
do you have any idea ?
please help!!! 
seeya everyone
Loron
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Loron wrote: do i have to use activesync in order to synchronize the two databases and how?
There are two ways you can achieve this. 1) Use ActiveSync. 2) Use the methods described in this article to transfer the data between the PocketPC and the desktop PC. Actually, you can use the functions in this article to setup an ActiveSync connection to the database.
Some issues to beware: 1 - If you are not using ActiveSync, when copying from the device to the desktop database, you will actually overwrite the desktop's table. This means that you will lose a lot of that table's definitions, especially the AutoNum fields, unique indexes and any relationships. ActiveSync will preserve these and will issue error reports when the data is not conformant. 2 - There is no provision in ActiveSync, or in the ADOFILTR, to copy table subsets to and from the device. You have to copy whole tables. So this means that if you want to set up some sort of filtering it will have to be implemented (tipically on the desktop) by you.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
Dear,
I am trying to use ADOCE on Pocket PC but I met a lot of problems. Could you please provide some sample code about using ADOCE on Pocket PC?
Thank you!
-BHKien
|
| Sign In·View Thread·PermaLink | 2.00/5 (2 votes) |
|
|
|
 |
|
 |
The code does not work correctly when compiled with the _UNICODE flag. This is so because the DLL functions will only take char* strings. So, in order for it to work correctly, replace all LPCTSTR by LPCSTR in the parameters of DeviceToDesktop and DesktopToDevice.
|
| Sign In·View Thread·PermaLink | 5.00/5 (2 votes) |
|
|
|
 |
|
 |
Wrong solution, sorry. You don't need to modify the code - just the way you're calling it.
Before:
pAdoFiltr->DesktopToDevice( "c:\\database\\test.mdb", ...
After:
pAdoFiltr->DesktopToDevice( _T("c:\\database\\test.mdb"), ...
The "_T" macro will automatically convert the strings to Unicode for you when _UNICODE is defined, or leave it as ANSI otherwise.
*Real* programmers use "copy con:progname.exe"!
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
 |
I found out about this article through an old friend who stumbled on it by accident, and then used the links to track me down. Kinda cool! Thanks for the honorable mention Olivier!
- Nathan Lewis
|
| Sign In·View Thread·PermaLink | 3.43/5 (4 votes) |
|
|
|
 |