Connect to SQL Server 2000

dotnet framework

    Next

  • 1. WS connection issues - over wifi
    We have a cf 1.0 (sp3) app that calls webservices to exchange data with the server. In order to enhance performance, I create an instance of the ws and cache it for the life of the app. This seems to work well overall but it seems to get confused sometimes when we switch between various wifi ap's... and it can no longer get a connection through. Restarting the app (or rebooting the device) seems to always cure the issue. I havent tested yet whether destroying the ws object and recreating it would fix the problem, partially because its not always easy to reproduce this problem (of course it happens in the field). Any ideas on possibly cleaning up and cached connection info that might be causing this ws object to get confused? Yes, we are planning to move it to cf 2.0 pretty soon. Thanks, Brady Moritz Fitiri
  • 2. web service problems
    I'm having an irritating problem consuming web services on a pda over a gprs connection Most of the time everything is fine and I can connect to web services synchronously and asynchronously However, sometimes a call to a web service seems to result in a partial connection. By this I mean that the connection does not fail outright (e.g. for a synchronous call the device will wait well past the Timeout setting) and there is some gprs traffice between the device and server, but the web service never returns a value. I'm forced to wait until the connection times out or resets, which seems to take at least 90 seconds If I use an async connection I can implement my own timeout and call myWebService.EndWhatever() using the IASyncResult. This function returns and my program will continue to run happily, however there seems to be a background thread that does not finish until the web service connection times out. This causes problems if the form is closed (getting an ObjectDisposedException) or the program tries to exit (hangs until the thread finishes), and there's no way in CF of forcibly aborting the thread I should note that if I abort a connection that is not in this strange partially connected state everything quits cleanly. So if there is no connection at all, or I abort the connection almost immediately after trying to open it, I don't have any problems Anyone have any insights into how I might fix this?
  • 3. TreeView.AfterSelect in CF 2.0 has unexpected behavior
    I have a TreeView.AfterSelect event method that behaves as I would expect in CF 1.0, that is, upon selecting a new node in the TreeView, the AfterSelect event fires and while stepping thru the code in that event, when I check TreeView.SelectedNode or e.Node, I get the node that I just clicked on. This is how I would expect an AfterSelect event to behave. In VStudio 2005/CF 2.0, running the same exact code, when I click a new node, the AfterSelect event fires and when I check TreeView.SelectedNode or e.Node, I do *not* get the node that I clicked on -- I get the previously selected node. It is as if the AfterEvent is behaving like a 'BeforeSelect' event. The node I clicked on does not even get highlighted. The user has to click the node a second time to get it to actually select and for the AfterSelect event to have posession of the selected node. Any ideas? I am using a Win Mobile 2003 Pocket PC, with CF 2.0.5238. Thanks! Tim
  • 4. Symbol MC9000 device memory problem
    Symbol MC9000 device memory problem Symbol MC9000 device using up memory after application is closed. I have deployed my application on MC9000 device and after performing some task exit from the application. I checked the memory before and after exiting the app. and found that after exiting it is consuming memory (around 2 to 2.5 mb). I have deployed same app. on pocket pc (symbol's) but there was not such problem of memory consuming. kendly help me in this issue. thanks and regards vikash

Connect to SQL Server 2000

Postby Chris Voon » Sat, 29 Nov 2003 21:14:11 GMT

I use the following code to connect to SQL server 2000 
from a connected PPC device. My pocket explorer is able 
to view the ssce. I execute the code on real pocketpc 
2002 device and emulator and both throws an exception 
when i execute the Open() method. An 
PlatformNotSupportedException thrown. Any idea what's 
wrong? I'm using SQL server 2000 with sp3 and sp3a sql ce 
server tools
----------------------------------------
    Public Sub GetResultSets()
        Dim conNwindCE As SqlConnection
        Dim cmdData As SqlCommand
        Dim connString As String
        Dim dr As SqlDataReader

        Try
            '   Create and open a connection
            connString 
= "server=10.1.12.72;database=NWind_SQLCE;"
            connString &= "user id=sa;pwd=pwd;"
            conNwindCE = New SqlConnection(connString)
            conNwindCE.Open()
        ......
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        Finally
            dr.Close()
            conNwindCE.Close()
        End Try
    End Sub
------------------------------------------------------

Connect to SQL Server 2000

Postby marcmc » Sun, 30 Nov 2003 00:26:19 GMT

double check you are using PPC2002
Dim HostName As String = System.Net.Dns.GetHostName()

You have the right versions, can't see anything wrong 
with your code...maybe try....this as this definetly 
works..
set txtDBName.Text on screen for something like 
\Storage Card\FolderName\DBName.sdf
-- wherever your sqlce db lives

Private DBNameConnection As SqlCeConnection   

DBconnection = New SqlCeConnection("Data Source = " & 
txtMasterDB.Text)

DBNameConnection.Open()
// code
DBNameConnection.Close()
DBNameConnection.Dispose()


Connect to SQL Server 2000

Postby Frank » Tue, 02 Dec 2003 16:00:10 GMT

If I understand properly you try to open a table on the 
server from the ppc. this is not possible: or you connect 
to a database residing on the ppc, which you synchronize 
with the server or you download a table from the server to 
the ppc.



RE: Connect to SQL Server 2000

Postby kboske » Fri, 05 Dec 2003 09:43:06 GMT

Chris,

Is your Pocket PC using the same language as your SQL Server?  If they do 
not match, change the Collation of the SQL Server Database to match that of 
the SQL Server.


Kevin Boske
( XXXX@XXXXX.COM )
SQL Server CE Team
Microsoft
----------------------------------------------------------------------------
----------------------------------------
Everything you need to know about SQL Server CE:

 http://www.**--****.com/ 
----------------------------------------------------------------------------
----------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
 http://www.**--****.com/ 
----------------------------------------------------------------------------
----------------------------------------
--------------------
Content-Class: urn:content-classes:message
From: "Chris Voon" < XXXX@XXXXX.COM >
Sender: "Chris Voon" < XXXX@XXXXX.COM >
Subject: Connect to SQL Server 2000
Date: Fri, 28 Nov 2003 04:14:11 -0800
Lines: 31
Message-ID: <08e601c3b5a9$2170ffe0$ XXXX@XXXXX.COM >
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Thread-Index: AcO1qSFwANmh94gcTFiFlRhumjrpYg==
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Newsgroups: microsoft.public.dotnet.framework.compactframework
Path: cpmsftngxa06.phx.gbl
Xref: cpmsftngxa06.phx.gbl 
microsoft.public.dotnet.framework.compactframework:39782
NNTP-Posting-Host: tk2msftngxa09.phx.gbl 10.40.1.161
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

I use the following code to connect to SQL server 2000 
from a connected PPC device. My pocket explorer is able 
to view the ssce. I execute the code on real pocketpc 
2002 device and emulator and both throws an exception 
when i execute the Open() method. An 
PlatformNotSupportedException thrown. Any idea what's 
wrong? I'm using SQL server 2000 with sp3 and sp3a sql ce 
server tools
----------------------------------------
    Public Sub GetResultSets()
        Dim conNwindCE As SqlConnection
        Dim cmdData As SqlCommand
        Dim connString As String
        Dim dr As SqlDataReader

        Try
            '   Create and open a connection
            connString 
= "server=10.1.12.72;database=NWind_SQLCE;"
            connString &= "user id=sa;pwd=pwd;"
            conNwindCE = New SqlConnection(connString)
            conNwindCE.Open()
        ......
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        Finally
            dr.Close()
            conNwindCE.Close()
        End Try
    End Sub
------------------------------------------------------



Similar Threads:

1.Connecting to SQL Server 2000 on a desktop pc that connects my cradle

Having some problem connecting to SQL server 2000 
database that is installed with a cradle, activesync etc 
on my desktop. I am trying to executescalar a a simple 
SQL query. I use very conventional way and I totally 
confused why I couldn't open the connection.

The code is as follows:
        Dim conn As System.Data.SqlClient.SqlConnection = 
New System.Data.SqlClient.SqlConnection( _
            "server=10.1.12.72;database=test;user 
id=sa;pwd=password;")
        conn.Open()
        Dim cmd As SqlCommand = New SqlCommand("select 
host_name()", conn)

        Try
            Dim result As String = cmd.ExecuteScalar()
            MessageBox.Show(result)
        Catch exq As SqlException
            MessageBox.Show(exq.Message)
        Catch ex As Exception
            MsgBox(ex.Message)
        Finally
            conn.Close()
        End Try

I run it with both PPC emulator and real device and both 
give me a debug message pops up:

An unhandled exception of 
type 'System.PlatformNotSupportedException' occurred in 
System.Data.SqlClient.dll

Additional information: PlatformNotSupportedException

I verified the above code and it run smoothly on normal 
windows application under windows xp. Can someone 
enlighten me please?

2.create table using access 2000 connecting to SQL Server 2000

Hi

I have created an Access 2000 database which links to all the tables on a remote SQL Server 2000 database.

How do I write the sql statement (or modify the sql statement generated in the query design mode) so that in a create table statement the table is created on the server?

currently any unmodified create table statement will create it on the local acess database.

I'd appreciate how to create the tables on the actual server and have the linked connection automatically be generated. Is this possible?

or should I be developing in Query analyzer or the query builder in enterprise manager?

any other suggests to a development architecture would be appreicated, thank you

3.VB App on SQL Server 7 machine cannot connect to SQL Server 2000 Database

I have VB app which is on a machine running SQL Server 7.0. This VB App
is not able to make a connection to a Database another server which is
running SQL Server 2000. Can anyone please help me with this issue and
guide me.

4.Connecting to SQL Server 2000 on Windows 2003 Server using sql-dmo

Hi

I have a strange problem connecting to a local SQL Server 2000 on a machine 
running Windows 2003 Server.

I'm using a plain connection as shown in the code below:

Dim oServer as New SQLDMO.SQLServer
With oServer
  .LoginTimeout = -1
  .LoginSecure = True 'Use NT Authentication
  .AutoReConnect = False
  .Connect (strServerName)
End With

I'm connecting through the IP of the machine.

The problem is: 
When I have a system32\drivers\etc\hosts entry specified pointing at the 
same machine, then I cannot connect to the SQL Server using NT Authentication.
I can however still connect by using SA user.

Error is: 
Runtime error '-2147203052 (80044814)':
[Microsoft][ODBC SQL Server Driver][SQL Server] Login failed for user 
'(null)'. Reason: Not associated with a trusted SQL Server connection.

If I remove the hosts entry I can connect without problems using both NT 
authentication and SA user.

It doesn't make any difference about the problem if I'm running NT 
authentication mode or mixed mode.

This code having this problem has run without problems on Windows 2000 
server, so it is an issue with Windows 2003 server. 

Does anyone have a clue to what might cause this problem?

Thanx in advance
/Brian

5.how to use sql server 2005 management tools to connect to sql server 2000

Hello,

After installing SQL Server 2005, I get a message stating "You must
use SQL Server 2005 management tools to connect to this server", while
trying to connect to my localhost using SQL Server 2000 Enterprise
Manager.

Regards,

junior

6. VB App on SQL Server 7 machine cannot connect to SQL Server 2000 Database

7. cant connect to Sql server 2000 sp3a in windows 2003 server

8. Unable to Connect To Sql Server 2000 using .NET 2005 EXPRESS



Return to dotnet framework

 

Who is online

Users browsing this forum: No registered users and 51 guest