about Windows Mobile 6

R

Rick

Hi guys!

A little question, using VS2005 to develop an application that runs on
Symbol 3090 and Windows CE 5.0, i can connect direct to SQL Server 2005 or
2000 (standar, workgroup, enterprise) with the sentence:

using System.Data.SqlClient; // and then create SqlConnection, SqlCommand
and so on


But now in mobile 6 i can't use that line, why? wm6 doesn't recognize that
line, or what do i need to install? or what is the way to connect to sql
server? (not compact)

I have installed VS2005 SP1, windows mobile 6 standar and professional SDK
and Microsoft SQL Server 2005 Compact Edition Developer SDK

In vs2005 i can create a dataset but i can't use it in my form.

Any idea?

Regards
Ricc
 
C

Chris Tacke, eMVP

What does "i can't use that line" mean? Do you get an exception? Do the
police raid your house? Does the planet explode? Your birthday gets
cancelled? Help us help you by providing meaningful information.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com
 
G

Ginny Caughey MVP

Rick,

Do you want to access SQL data that is stored on your device, or data that
your device connects to through a network? For device-stored data, use
SqlServerCe namespace. For data you connect to via WiFi perhaps, use
SqlClient.
 
R

Rick

jijijiji Chris when i said "i can´t use that line" is because the compiler
doesn't recognises it, intellisense doesn't shows me SqlClient

Error 1 The type or namespace name 'SqlClient' does not exist in the
namespace 'System.Data' (are you missing an assembly reference?)
C:\Mobile6_Ex1\Mobile6_Ex1\Form1.cs 5 19 Mobile6_Ex1


Ginny, i want to access a SQL Server on my LAN, that's why i need to use
System.Data.SqlClient. But in references i can't add SqlClient, it isn't at
reference list

Regards
Rick
 
S

Simon Hart [MVP]

You need to add a reference to System.Data.SqlClient.dll. SqlClient namespace
has never been part of assembly System.Data.dll.
 
R

Rick

Hi Simon, Chris, i know i have to add the reference, in other project i did
a couple of years, i have added the reference to SqlClient (i made it in
other PC that i don't have anymore) but i have noticed in that project the
System.Data reference points to C:\Program
Files\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\System.Data.dll

in this page http://msdn.microsoft.com/en-gb/library/ms174628.aspx says it
should be at C:\Program Files\Microsoft Visual Studio 8\Common7\IDE
but it's not there, i'm not sure but, do i need to install SQLServerCE on my
PC? or run an installer from C:\Program Files\Microsoft Visual Studio 8 to
can get the correct dll?

Regards
Rick
 

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