VB.NET CF query remote SQL server.

G

Guest

Im new to the VB.NET stuff but I am looking for a way to query a remote SQL database from a pocket PC application. I have done this in the past with VB6 in wondows using data environment disigners but I dont believe that this is supported with the compact framework.

Any help or sample code would be great!
 
C

Cor Ligthert

Hi Leo,

Do you know that there is a newsgroup

microsoft.public.framework.compactframework

Pretty active.

Cor
 
W

William Ryan eMVP

You just need to add a reference to the SqlClient dll and then add IMports
System.Data.SqlClient namespace (technically you don't have to do this last
step but it will make life easier).Basically just add this reference, build
your connection string and off you go, I can't think of any differences
between full SQL Server and accessing it on the CF (although Sql Server CE
has a bunch of differences).

If you head over to devbuzz, we have two CF forums (one for VB.NET
http://forums.devbuzz.com/%NET_Compact_Framework_-_VB%NET/forumid_20/tt.htm)
and one for C#
http://forums.devbuzz.com/%NET_Compact_Framework_forum_for_C#/forumid_43/tt.htm
and we also have a Sql Server CE forum
http://forums.devbuzz.com/SQL_Server_for_CE_Forum/forumid_4/tt.htm if you
are interested in using CE. After you build add the reference, it's almost
identical to using SQL Server on the desktop although you probably will want
to specify the permissions. Dan Fergus (author of The Definitive Guide to
the Compact Framework) and Rob Tiffany author of Sql Server CE and the
compact framework (two must have books) both actively participate there and
we have a bunch of Cf mvps' as moderators and authors and we all help out
on the forums.

www.opennetcf.org is also a site that you don't want to miss. It's the best
CF site on the web and although not focued to sql Server and SqlClient,
there's a lot of discussion on it and there's a ton of knowledge. If you
are going to do any CF development, Opennetcf is Definitely the best
resource there is and something that will make your life much easier.


Casey Chesnut also has a bunch of great content at www.brains-n-brawn.com
and he discusses SQL Server, CF stuff, Web Services and much more. It will
be helpful too.
HTH,

Bill

--

W.G. Ryan, eMVP

http://forums.devbuzz.com/
http://www.knowdotnet.com/williamryan.html
http://www.msmvps.com/WilliamRyan/
Leo_Dee said:
Im new to the VB.NET stuff but I am looking for a way to query a remote
SQL database from a pocket PC application. I have done this in the past with
VB6 in wondows using data environment disigners but I dont believe that this
is supported with the compact framework.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top