CF and remote connecting to database

  • Thread starter Thread starter amateur
  • Start date Start date
A

amateur

Hi,

I write a C#-application for handheld with Windows CE .Net in VS .Net 2003.
I try to connect cleint-application in handheld to database (OS: MS Windows
2000 , DB: MS Access 2000) via SqlConnection but it is not successful .
string strConnect= @"Data Source=\\MyServer\MyDatabase; database=books.mdb";


SqlConnection con =new SqlConnection(strConnect);

try

{

con.Open();

MessageBox.Show("Quelle:"+con.DataSource+"\r\n"+"State:"+con.State);

}

catch (Exception ex)

{

MessageBox.Show(ex.Message,"Error");

}

finally

{

con.Close();

}

PC and handheld are connected via WLAN.
The quethion: is it possible or not ?
If not , is there other capabilities ?

Best regards

Amateur
 
As an alternative, consider building a web service that would access the
Access database and return data (or update data)
 
Hi George:

The method Larry references involves using Peter Foot's ADOCE wrapper and
it's probably the best (if not only) mechanism for hitting pocket access.
As far as products go, it's a first rate tool from start to finish.
However, as Chris pointed out, nothing out there is going to let you hit an
Access DB through a SqlConnection object. Moreover you're not going to be
able to connect to an Access db on a network share w/ the ADOCE wrapper -
it's made specifically to speak to Pocket Access. Pocket Access is made to
sync with a desktop counterpart but I don't know of any library for
connecting directly to desktop Access from the CF.

HTH,

Bill

--
W.G. Ryan MVP Windows - Embedded

Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/community/newsgroups
 
Hi Chris,

Is OLE DB supported in Compact framework ( I mean OleDbConnection class)?

Amateur
 
Back
Top