|
Disappointing article. There is almost no discussion of the code, implementation issues, or lessons learned.
|
|
|
|
|
Requet to send data to the computer running iis has failed.
Error:28037
Microsoft sql server ce
I have VS2008 and sql server ce 3.5 and want to connect to remote Sql server2005
Below is my xml file:
<databaseserver>PALINFOC-55F8BC\SQLEXPRESS
<databasename>D1Temp
<databaselogin>
<databasepassword>
<sqlceurl>http://192.168.11.217/sqlcesa35.dll
<localdbconnect>Provider=Microsoft.SQLServer.OLEDB.CE.3.5; Data Source=\Program Files\MyFavourite\my.sdf;
<localdblocation>\Program Files\MyFavourite\
<localdbname>my.sdf
<iislogin>IUSR_PALINFOC-55F8BC
<iispassword>pal
here:
1)PALINFOC-55F8BC\SQLEXPRESS is my pc name
2)D1Temp is the remote db in sql server 2005
3)\Program Files\MyFavourite\my.sdf = path to local sqlserver ce db
Plz help me as i am spending sleepless nights to resolve this?
|
|
|
|
|
Hi,
I havent tested this application with sql server 2005. Let me give a try.
Thanks,
Rasheed.
If u know do it... else learn it!
|
|
|
|
|
Hello Rasheed
I hav tried with sql server 2000 also and getting the same error 28037.
A request to send data to the computer running IIS has failed. For more information, see hr result
Plz help???????????//
|
|
|
|
|
I hav done that.Anyways thanx for trying.
|
|
|
|
|
Hi,
I have the same problem on SQL2005. I'm using VS.NET 2005 and the code "If Not File.Exists(oDBConfig.LocalDBLocation & oDBConfig.LocalDBName) Then ...." in frmMain.vb return "Database Dose not exist..." message.
If I use the "Data Source=\My Documents\MyFav.sdf;" for LocalDBConnect parameter into Config.Xml, Where the DB file muse be located?
My project directory is: "E:\Omid\Download\PocketPCwithSQLCE_Src"
By the way, I cann't understand why the "Path.GetDirectoryName([Assembly].GetExecutingAssembly.GetName.CodeBase)" return "\Program Files\MyFavourite"?! How can I explore this path?
Thanks
Omid
|
|
|
|
|
Hi, i was working fine with my project until i reinstall windows xp. Here is the deal, i'm getting the native error 28017. According to this http://msdn.microsoft.com/en-us/library/aa224612(SQL.80).aspx#sqlce_troubleconnect_topic04[^], it's a error on the internet url but i have no idea how to fix this.
When i try to open in the device http://server ip/share/sqlcesa30.dll, i get the message of i don't have the authorization to view this page. Or i get the message box of asking for user & password.
Any idea of how to fix this? I set in the share folder configuring to the clients will log on anonymously.
|
|
|
|
|
can u tell me how to capture phone incoming call information and transfer it onto my pocket pc database. is it possible to do it?
thanks
|
|
|
|
|
Hello ,
I have got this Error: Header information is either corrupted or missing. [,,,Header name,,].
Pavan Pareta
|
|
|
|
|
hi
i downloaded your code but i'm having tons of trouble running it...this is my first time running sqlce and trying to access a database over a pda so i have zero experience in the matter. anyways, i cant seems to get the parameters right in the config file, the program compiles and runs gr8 but when i try to update the database or submit a new query to the database i get a missing method exception for the internet.url, i've looked at the msdn website to try to figure out the parameters but nothing worked.. i'm using sql server 2005 with windows mobile 2005 and running the app with the ppc on the cradle...plz let me know if there's anything wrong with wat i'm doing...any input will help
thx
Ghassan.
|
|
|
|
|
Hi
Can you even use SQL Express 2005 as a host for running RDA applications i thought only sql server 2005 supported this.
can anyone pls confirm.
rajesh
Rajesh
|
|
|
|
|
Dear Rasheed,
I have a problem with synchonize data from Pocket PC to PC and opposite. It raise error
Message="A request to send data to the computer running IIS has failed. For more information, see HRESULT."
HResult=-2147012867
NativeError=28037
Now I use SQL Server Mobile 2005 and SQL Server Express 2005
I test SQL Server Mobile Agent, it runs well in PC:
http://192.168.2.12/SQLServerMobile/sqlcesa30.dll
I use Emulator in VS2005(not actual Pocket PC). I start IE in my Emulator with http://192.168.2.12/SQLServerMobile/sqlcesa30.dll
but It can not run. It message "Cannot connect for an unknow reason". To check your connection setting and change them if needed, tap Settings ..."
I can not execute Pull, also Push method!
This is source code:
-------------------------------------------------------------
SqlCeConnection cn = null;
string rdaOleDbConnectString = "Provider=sqloledb; Data Source=VANTINH\\SQLEXPRESS;" +
"Initial Catalog=" + "QLSV; " +
"User Id=" +
";Password=";
SqlCeRemoteDataAccess rda = null;
try
{
rda = new SqlCeRemoteDataAccess();
rda.InternetLogin = "username";
rda.InternetPassword = "password";
rda.InternetUrl = "http://192.168.2.12/SQLServerMobile/sqlcesa30.dll";
rda.LocalConnectionString = "Data Source=\\Program Files\\" + "Test.sdf";
if (this.chkDropTable.Checked)
{
cn = new SqlCeConnection(rda.LocalConnectionString);
cn.Open();
SqlCeCommand cmd = cn.CreateCommand();
cmd.CommandText = "DROP TABLE " + "HocSinh";
cmd.ExecuteNonQuery();
if (cn.State != ConnectionState.Closed)
cn.Close();
}
if (this.cmbTrackOption.Text == "TrackingOff")
rda.Pull("HocSinh",
"select * from HocSinh",
rdaOleDbConnectString,
RdaTrackOption.TrackingOff,
"ErrorTable");
if (this.cmbTrackOption.Text == "TrackingOn")
rda.Pull("HocSinh",
"select * from HocSinh",
rdaOleDbConnectString,
RdaTrackOption.TrackingOn,
"ErrorTable");
if (this.cmbTrackOption.Text == "TrackingOffWithIndexes")
rda.Pull("HocSinh",
"select * from HocSinh",
rdaOleDbConnectString,
RdaTrackOption.TrackingOffWithIndexes,
"ErrorTable");
if (this.cmbTrackOption.Text == "TrackingOnWithIndexes")
rda.Pull("HocSinh",
"select * from HocSinh",
rdaOleDbConnectString,
RdaTrackOption.TrackingOnWithIndexes,
"ErrorTable");
}
catch (SqlCeException exc)
{
MessageBox.Show(exc.Message);
return;
}
finally
{
//MessageBox.Show("Table is Pulled Successfully");
rda.Dispose();
this.Close();
}
-----------------------------------------------------------------------------------
Please help me to solve this problem!
-------------------------------------------------------------
Could you help me to solve this problem?
Thanks a lot!
Tommyitvn
|
|
|
|
|
Tommyitvn,
I havent tryed in VS2005 with SQL 2005. I am sorry that i am unable to provide answer for this.
Rasheed.
Try try until achive your GOAL
|
|
|
|
|
Hi,
I get the MissingMethod Exception when trying to create a SqlCeRemoteDataAccess object when I run the application on my handheld. It works fine in the emulator.
Im running Windows CE with CF 1.0 and VS.Net2003 with SQL2000 server.
any help would be great
the only thing for sure is that nothing's for sure
|
|
|
|
|
Make sure your have added all reference required.
storynana
|
|
|
|
|
Hi rasheed
help me solve the problem posted a few min back...plz..plz..plz
|
|
|
|
|
why isnt there anyone who can help me solve the problem
I have the detailed description of the error here:
Source: Microsoft SQL Server 2000 Windows CE Edition
Native Error: 28507
HR: 80004005
Description: some distributor properties are not specified
Param = 0
Param = 0
Param = 0
Param =
Param =
Param =
With reference to books online, the error is SSCE_M_MISSINGDISTRIBUTORPROPERTIES
I tried giving sa as the user name and password for distributor with no avail.
~Sudha
|
|
|
|
|
Sudha,
Let me check the problem...
Rasheed.
Try try until achive your GOAL
|
|
|
|
|
Initializing replication, gives error 80004005...
*I have configured the server to have SQL Authentication on my SQL Server. also tried using domain account(with permissions to acess database) with no avail
*Executing http://10.0.0.10/sql/sscesa20.dl displays "SQL Server CE Server Agent" on my hand held device
*Virtual dir is configured to use annonymous access.
where am i wrong in my code?
are there any additional steps to be followed to
My instinct says there is something else i got to do with sql server configuration....but i am not able to figure that out
void InitializeReplicationRDA()
{
HRESULT hr;
hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
hr = CoCreateInstance(CLSID_Replication,
NULL,
CLSCTX_INPROC_SERVER,
IID_ISSCEMerge,
(LPVOID *)&CEMerge);
if(FAILED(hr))
{
MessageBox (NULL, TEXT("THE DATABASE OBJECT COULD NOT BE
CREATED"), TEXT("NO DATABASE CONNECTIVITY"), MB_OK);
return;
}
else
MessageBox (NULL, TEXT("INSTANCE SUCCESS"), TEXT("SUCCESS!!!"),
MB_OK);
CEMerge->put_InternetURL(L"http://10.0.0.10/sql/sscesa20.dll");
CEMerge->put_InternetLogin(L"");
CEMerge->put_InternetPassword(L"");
CEMerge->put_Publisher(L"SQLSERVER");
CEMerge->put_PublisherDatabase(L"southwind");
CEMerge->put_Publication(L"southwind");
CEMerge->put_PublisherSecurityMode( (REPL_SECURITY_TYPE)DB_AUTHENTICATION);
// CEMerge->put_PublisherSecurityMode (NT_AUTHENTICATION);
CEMerge->put_PublisherLogin(L"sa");
CEMerge->put_PublisherPassword(L"<sa password="">");
CEMerge->put_PublisherNetwork((REPL_NETWORK_TYPE)DEFAULT_NETWORK);
CEMerge->put_Subscriber(L"southwind");
CEMerge->put_SubscriberConnectionString (L"Provider=microsoft.sqlserver.oledb.ce.2.0;Data
Source=southwind.sdf");
CEMerge->put_DistributorNetwork((REPL_NETWORK_TYPE)DEFAULT_NETWORK);
CEMerge->put_DistributorSecurityMode ((REPL_SECURITY_TYPE)DB_AUTHENTICATION);
CEMerge->put_DistributorLogin(L"");
CEMerge->put_DistributorPassword(L"");
CEMerge->put_ExchangeType((REPL_EXCHANGE_TYPE)BIDIRECTIONAL);
CEMerge->put_Validate(NO_VALIDATION);
//ADD SUBSCRIPTION
GetLocalTime(&systemtime);
SystemTimeToFileTime(&systemtime, (FILETIME*)&timeStart);
// hr = CEMerge->AddSubscription(CREATE_DATABASE);
hr = CEMerge->AddSubscription(EXISTING_DATABASE);
if (SUCCEEDED(hr))
{
GetLocalTime(&systemtime);
SystemTimeToFileTime(&systemtime, (FILETIME*)&timeStop);
timeTotal = ((double)(timeStop - timeStart) / 10000000);
swprintf(wszBuffer, L"Subscription added\r\n\r\nElapsed time in
seconds = %8.3f", timeTotal);
MessageBox(NULL, wszBuffer, L" A D D S U B S C R I P T I O N ",
MB_OK);
}
else
{
printf("%x",hr);
MessageBox (NULL, TEXT("S U B S C R I P T I O N F A I L E D"),
TEXT("error"), MB_OK);
}
//SYNCHRONIZE
hr = CEMerge->Initialize();
if (SUCCEEDED(hr))
{
MessageBox (NULL, TEXT("I N I T I A L I Z E SUCCESS"),
TEXT("SUCCESS!!!"), MB_OK);
fInitialized = TRUE;
hr = CEMerge->Run();
}
else
{
printf("%x",hr);
MessageBox (NULL, TEXT(" I N I T I A L I Z E F A I L E D"),
TEXT("error"), MB_OK);
}
if (SUCCEEDED(hr))
{
MessageBox (NULL, TEXT("Run SUCCESS"), TEXT("SUCCESS!!!"), MB_OK);
LONG lPubChanges;
LONG lPubConflicts;
LONG lSubChanges;
GetLocalTime(&systemtime);
SystemTimeToFileTime(&systemtime, (FILETIME*)&timeStop);
timeTotal = ((double)(timeStop - timeStart) / 10000000);
CEMerge->get_PublisherChanges(&lPubChanges);
CEMerge->get_PublisherConflicts(&lPubConflicts);
CEMerge->get_SubscriberChanges(&lSubChanges);
swprintf(wszBuffer, L"Synchronization Complete\r\n\r\nElapsed time in
seconds = %8.3f\r\nPublisher Changes = %d\r\nPublisher Conflicts =
%d\r\nSubscriber Changes = %d", timeTotal, lPubChanges, lPubConflicts,
lSubChanges);
MessageBox(g_hwndMain, wszBuffer, L" S Y N C H R O N I Z E ",
MB_OK);
}
else
{
printf("%x",hr);
MessageBox (NULL, TEXT(" S Y N C H R O N I Z E F A I L E D"),
TEXT("error"), MB_OK);
}
if (fInitialized)
(void)CEMerge->Terminate();
// Create and initialize the RDA object
hr = CoCreateInstance(CLSID_RemoteDataAccess, NULL,
CLSCTX_INPROC_SERVER, IID_ISSCERDA, (LPVOID *)&CERDA);
CERDA->put_InternetURL(L"http://10.0.0.10/sql/sscesa20.dll");
CERDA->put_InternetLogin(L"");
CERDA->put_InternetPassword(L"");
CERDA->put_LocalConnectionString(L"Provider=microsoft.sqlserver.oledb.ce.2.0;Data
Source=southwind.sdf");
wcscpy(wszConnectString, L"provider=sqloledb; data source=SQLSERVER;
Initial Catalog=southwind; user id=sa; password=sa");
wcscpy(wszLocalTable, L"southwind");
wcscpy(wszErrorTable, L"southwinderr");
wcscpy(wszQuery, L"select * from T1");
//PULL
// Invoke the RemoteDataAccess Object
bstrConnectStr = SysAllocString(wszConnectString);
bstrLocalTable = SysAllocString(wszLocalTable);
bstrErrorTable = SysAllocString(wszErrorTable);
bstrQuery = SysAllocString(wszQuery);
hr = CERDA->Pull((WCHAR*)bstrLocalTable,
(WCHAR*)bstrQuery,
(WCHAR*)bstrConnectStr,
TRACKINGON,
(WCHAR*)bstrErrorTable);
SysFreeString(bstrConnectStr);
SysFreeString(bstrLocalTable);
SysFreeString(bstrErrorTable);
SysFreeString(bstrQuery);
// Handle Errors
if (SUCCEEDED(hr))
{
GetLocalTime(&systemtime);
SystemTimeToFileTime(&systemtime, (FILETIME*)&timeStop);
timeTotal = ((double)(timeStop - timeStart) / 10000000);
swprintf(wszBuffer, L"Pull succeeded\r\n\r\nElapsed time in seconds =
%8.3f", timeTotal);
MessageBox(g_hwndMain, wszBuffer,L" R D A P U L L", MB_OK);
}
// else
// ShowRDAErrors(L"Pull failed");
TerminateReplicationRDA();
return;
}
Any help is greatly appreciated...
Sudha
|
|
|
|
|
Does somebody nows a good book for pda applications in .net?
|
|
|
|
|
Microsoft .NET Compact Framework / Andy Wigley
ISBN 0-7356-1725-2
|
|
|
|
|
Started with RDA and facing a lot of problems.I installed SQL SERVER CE 2000 tools and created a virtual folder containing sscesa20.dll.When i type http://<my_pc_ipaddress>/<virtual folder="">/sscesa20.dll, it shows 'SQL SERVER CE Server Agent'.When i put the pocket pc in the cradle(which is connected to my desktop)and type the same url in PIE, it also shows 'SQL SERVER CE Server Agent'.
Now I created a database by name 'D1temp' in the SQL SERVER and created the table 'myfavourite' using the script file provided.It got created but the table is empty.
On the Pocket PC,i created a database by name 'myfav.sdf' in '\My Documents' folder and added the fields given in the script file and added some records also.
In the Config.xml file,I have used the following details:
DatabaseServer: The Server name under which the D1Temp database gets listed.
DatabaseName: D1Temp
DatabaseLogin:sa
DatabasePassword:
SqlCEURL:http://<my_pc_ipaddress>/<virtual folder="">/sscesa20.dll
IISLogin:
IISPassword:
When i run the program,The records get displayed and when i say 'Sync from Host', It comes till rda.InternetLogin = odbConfig.IISLOgin and jumps to error and nothing is displayed in the error.
Am i in the right track towards RDA? Or else guide me the right steps.
Please help me to find the error and rectify it.
|
|
|
|
|
Hi, I just wondering if it is possible to send to Desktop Ms Access?
|
|
|
|
|
I guess you can.
Try try until achive your GOAL
|
|
|
|
|
Hie all,
I'm using SQL server 2000 with sp2 and IIS 5 running on the same machine.But whenever I try to install SQL server ce 2.0 server components I get an error msg telleing me tht the SQL SE version is only for higher than version sp1.I'm a bit confused!! Can anybody tell me what wrong I'm doing ??
I need another help,Can anybody tell me if this type of Data sync will work on Bluetooth and if then what else shud I do to get access to Desktop SQL server 2000 ??
Thanks in advance,Specially thnks to Rasheed for this cool article
BR
Arif
Sun2Moon
|
|
|
|
|