Re: Connect to Desktop SQL Server 2000 from Pocket PC

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Robert J (paa_at_bigpond.com)
Date: 06/23/04


Date: Wed, 23 Jun 2004 23:13:01 GMT

I am using :

Imports System.Data.SqlClient

Private Sub cmdLogin_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles cmdLogin.Click

    Dim Conn As New SqlConnection
    Dim strConnString As String

    Try
        strConnString = "server=" & strServer & "; uid=sa; password=;
database=" & strDBase
        Conn.ConnectionString = strConnString
        Conn.Open()
    Catch ex as exception
         Arggghhhhhhhhhhhhh !!!!
    End Try
End Sub

For SQL Server 7 but MSDE should be the same

Cheers

Robert

"Mystic Mong" <alastair.williamson@tiso.co.uk> wrote in message
news:40d73b0a$0$4576$db0fefd9@news.zen.co.uk...
> Hi there,
>
> I have been attempting to perform a similar task today - I need to send
data
> from a local SqlCe table to a database residing on a desktop machine. I
have
> MSDE installed on the desktop and it accepts network requests (tested from
> another laptop).
>
> My problem is that when my PDA is connected to the desktop via ActiveSync
I
> get "Could not find server" exceptions when I try to execute the
> SqlConnection Open command.
>
> My connection string is essentially the same as Leonardo's (server name,
> instance name, username and password). My connection string is the same as
I
> use for connecting to our enterprise SQL Server via wireless connection so
> is there a reason why I am having problems via ActiveSync? I am assuming I
> have missed something basic as my knowledge is limited on this stuff.
>
> Any help (code snippet would be fab!) would be much appreciated.
>
> Cheers
>
> C-Ya Aly
>
> "Leonardo Castillo" <castillolj@hotmail.com> wrote in message
> news:eV%23I4s6VEHA.1652@TK2MSFTNGP09.phx.gbl...
> > Hi,
> >
> > I need to connect from a program in the Pocket PC to SQL Server in my
> > desktop. How i can do than in VB.NET ?.
> > (I need an information in one table in SQL Server 2000).
> >
> > Thanks,
> >
> > Leonardo Castillo.
> >
> >
>
>



Relevant Pages

  • Re: My Book is Incomplete Regarding SQL Commands ;-(
    ... Hitchhiker's Guide to Visual Studio and SQL Server ... Create a Connection object and pass in a ConnectionString to ... manage the database table you reference. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Changing Connection String programmatically
    ... Connection strings of different years can be stored in app.config ... is declared in MyDataset.Designer.cs as private, ... every year we will create new database. ... If you are storing connnection string information related to additional ...
    (microsoft.public.sqlserver.connect)
  • Send Form results to database error
    ... ' Send results to the database. ... ' myConnString = Connection string to database. ... ' myConnection = The database connection object. ...
    (microsoft.public.access.forms)
  • Re: User count
    ... Dim colUsers as New Collection ... Dim sCompName as string ... or back it up, or something, then take a look at the use of the "Connection ... Create a table in the front-end database, ...
    (microsoft.public.access.formscoding)
  • Re: (Newbie)Application Roles
    ... level: the database itself. ... SQL Server accommodates these needs through the use of application ... the user's connection through a specific application. ... the connection permanently loses all permissions applied to ...
    (microsoft.public.sqlserver.security)