Accessing SQL Server

  • Thread starter Thread starter Wapiti
  • Start date Start date
W

Wapiti

Can someone point me to the jest of what it takes to connect directly to a
SQL Server?

My PPC has network connectivity and can ping the network server, but not
sure from here, how to gain access to the data in my sql server database.

I've used SQLserverCE onboard my ppc successfully, but not directly
connected to my server's sql server database.

Thanks for any leads you can offer!
 
The *gist* (I like your typo though) of establishing the connection to the
external SQL server is to use SqlClient class passing to it the connection
string identical to one you would use with SqlClient on the desktop (note,
that this is different from OLEDB connection string - there is no Provider=
value).

It helps to use server's IP address as in many cases name resolution on the
device is limited, but of course you don't have to do it. SO just go ahead,
create and open SqlConnection, create a SqlCommand and execute it.
 
gist/jest -yah, whatever -grin.

Must be the 'Provider=' where I'm going wrong then. Sounds like I'm going
down the right track, just not getting the connection string correct. My
connection keeps failing with "unknown connection option in connection
string: provider"

When I remove the Provider=, I get, "Invalid delimiter ; found in connection
option SQLOLEDB.1;Integrated Security."

Or, maybe its because I'm trying to test all this using the emulator? Can
the emulator connect to a local sql database using this method? I found
some reference that said I have to enable the Guest account - did that, and
still the same. ??

Get my Jist? ;)

Thanks Alex.
 
ACK, sorry guys, actually, I found the problem with the bad delimiter - I
didn't remove the sqloledb reference in the connection string. Fixed that
and its getting closer...

I'm getting a message now that says "General Network Error" -- I have tried
to use an ip address (even tho its local) as well as the server name. But
still get this error.

Someone, from a google search, said they fixed it by 'changing the
connections driver on the sql server machine' (paraphrased). Does this make
sense to you?

http://groups.google.com/groups?hl=...ework&hl=en&lr=&ie=UTF-8&safe=off&sa=N&tab=wg

In fact, Alex, you were the one helping him with it.

Any thoughts?
 
Wapiti I have similar problem!
It use to work fine, but not anymore.
I realisze I just install XP SP2, that might be the reason?
but removing the firewall doesn't fix the problem and I can't rollback I
removed the necessary file (lacking space on my main partition, sigh...)

I'm kind of stuck now......
 
I'm still working on it too Lloyd. Its gotta be something pretty simple. I
like the additional statement in the error message after "General Network
Error" that says, "Check your network documentation" --- has anyone every
really seen a set of 'network documentation'?? If there is, I need to get
ahold of one of those. smirk.

If I find anything that resolves this GNE message I'll post back.

-Mike
 
Oh, Lloyd, I don't think its an XP sp2 issue, as I'm developing on my Win2k
Server at the moment and still getting the error on my emulator.

-m
 
Back
Top