fail to connect to sql server 2000 using emulator 4.2

dotnet framework

    Next

  • 1. WinForms Cleanup - Object Disposed Exception
    I have a forms class that contains as a member object another forms object. The problem I am having is when the created forms object is closed, an ObjectDisposedException exception is generated when I return to the main form and execute the event handler the second time. public class CustomerRequest_CSS056 : System.Windows.Forms.Form { private CustomerRequestInfo_CSS057 _customerRequestInfo; private void MenuItemRequest_Click(object sender, System.EventArgs e) { if (this._customerRequestInfo == null) { this._customerRequestInfo = new CustomerRequestInfo_CSS057(_customerNumber,_requestNumber); } this._customerRequestInfo.Show(); } } If I create the form on the stack and not as a member variable then the exception goes away, but what is really going on here ? When I close the created window using the <OK> button what actually happens ? Does that form get Disposed. Suppose I just go about creating new Form() objects and calling Show() won't I just have dozens of windows about ? Will the Garbage Collector clean this up if I just keep constructing windows and call Show() ? Thanks for the help
  • 2. Copy of the control
    Im using a Panel control and its instance as template and I want to create more instances of this Panel based on the template... how to do Copy of the control as new instance??? Thanks... Me
  • 3. Just one instance of my program
    Hi, how can i prevent that my program is started several times? (using the compactframework not the standard) THX Schorschii
  • 4. SQL Server CE Database : Pda to desktop and back
    Is there anyway to create an SQL Server CE Database on the pc desktop, and also a way of taking the SQL Server CE Database from the pda to the desktop using a method other than replication??

fail to connect to sql server 2000 using emulator 4.2

Postby stone zou » Wed, 03 Dec 2003 16:53:50 GMT

hi:
   i use the VS2003, WinCE Emulator4.2 , IIS, SQL Server 2000
   IIS security used the anonymous login.


   My code is :
   DBPath =  shellui.sqlcewrapper.LocalDatabase;
   lconnstr = "Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data Source=" +
DBPath + "; Password = 123;";

   //Create replication object and initialize it
   SqlCeReplication sscerepl = new SqlCeReplication();
   sscerepl.InternetUrl=URL.Text;     //URL of the server agent
   sscerepl.InternetPassword = "liuwenhua";     //credentials for the IIS
directory where the server agent resides
   sscerepl.InternetLogin ="IUSR_CPULICHWEILIU";
   sscerepl.Publisher=SQLServer.Text;    //publisher
   sscerepl.Publication = "contact";   //name of the publication
   sscerepl.PublisherDatabase = "truetel";   //name of the published DB
   sscerepl.PublisherLogin = user.Text;   //credentials for the DB/PAL
(publication access list)on server
   sscerepl.PublisherPassword =password.Text;
   sscerepl.Subscriber = "SQLCE_Client";  //name of the client device
(optional)
   sscerepl.SubscriberConnectionString = lconnstr; //conn string for the
local SQLCE DB
   sscerepl.AddSubscription(AddOption.CreateDatabase);


   the return error code is:
    native error: 28037
    message: a request to send data to the computer running IIS has fialed.
    for more information, see HRESULT.[,,,,,]
    Source:Microsoft SQL Server 2000 Windows CE Edition



Re: fail to connect to sql server 2000 using emulator 4.2

Postby Alfred Gary Myers Jr. » Fri, 05 Dec 2003 06:21:47 GMT

Hi,

This can happen for instance if IIS is stopped.

Alfred Gary Myers Jr.
Yuma Informica Ltda.






fialed.



Re: fail to connect to sql server 2000 using emulator 4.2

Postby kboske » Fri, 05 Dec 2003 09:29:30 GMT

8037 can be returned when the IIS server is not running, or the URL is
incorrect.

Verify that you can connect from your device to the IIS Server by pinging
the URL from PocketIE. If you can get "SQL Server CE Server Agent"
returned from the SQL Server CE Server Agent, then you should be able to
complete a sync.

If you cannot, then you need to verify that your URL is correct, the IIS
Server is up and running.

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

http://www.microsoft.com/sql/ce/techinfo/default.asp
----------------------------------------------------------------------------
----------------------------------------
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.microsoft.com/info/cpyright.htm.
----------------------------------------------------------------------------
----------------------------------------
--------------------
From: "Alfred Gary Myers Jr." < XXXX@XXXXX.COM >
References: < XXXX@XXXXX.COM >
Subject: Re: fail to connect to sql server 2000 using emulator 4.2
Date: Wed, 3 Dec 2003 18:21:47 -0300
Lines: 49
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: < XXXX@XXXXX.COM >
Newsgroups: microsoft.public.dotnet.framework.compactframework
NNTP-Posting-Host: 200.144.29.2
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.compactframework:40124
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

Hi,

This can happen for instance if IIS is stopped.

Alfred Gary Myers Jr.
Yuma Informica Ltda.


"stone zou" < XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...
fialed.





Similar Threads:

1.Problem connecting SQL Server 2000 from Pocket PC 2003 SE emulator

Hi,

I am developing Device Application using VS.NET 2005, Pocket PC 2003 SE
Emulator and SQL Server 2000 database

Whenever I run the application from emulator, getting error " Specified
SQL Server does not found:10.1.15.1\\SQL2K ".

I tested the same code in the Windows application, It's working fine.

tried connecting LAN PC shared folders using Emulator File Explorer.
(Changed Device ID of the emulator and tried, but no luck)

Code Snippet as follows

SqlConnection ConObj = new SqlConnection();
ConObj.ConnectionString = "User ID=sa; Password=sa; Initial
Catalog=DotNetCF; Data Source=10.1.15.1\\SQL2K";

     SqlCommand cmdObj = new SqlCommand("SELECT * FROM jobs", ConObj);
     SqlDataReader drObj;
     ConObj.Open();
     drObj = cmdObj.ExecuteReader();
     while (drObj.Read())
     {
        listBox1.Items.Add(drObj.GetString(2));
     }
     drObj.Close();
     ConObj.Close();

Thanks in advance for any help!!!

-Rao

2.Failing to connect to remote SQL Server 2000 from ASP.NET 2.0 application

I have a problem (like most others posting issues on this forum :) )

I have a remote server running Windows XP SP2, with both SQL Server
2005 Express with Advanced Features and SQL 2000 installed. I can
remotely connect to the SQL Server 2000 instance using Query Analyser
or Enterprise Manager. I can also remotely connect to the SQLEXPRESS
using Management Studio Express Edition.

I am writing an ASP.NET 2.0 with VS2005 application (actually upgraded
from .NET 1.1 with VS2003). However, now I cannot connect to the
remote SQL Server 2000 from the application. I can connect to a
locally installed SQL Server 2000 on the development machine, but I
cannot connect to the remote server. I get these two errors:

WITH NAMED PIPES DISABLED AND TCP/IP ENABLED IN THE SQL SERVER 2000
CLIENT NETWORK UTILITY
provider: TCP Provider, error: 0 - A connection attempt failed because
the connected party did not properly respond after a period of time,
or established connection failed because connected host has failed to
respond.

WITH BOTH NAMED PIPES AND TCP/IP ENABLED IN THE SQL SERVER 2000 CLIENT
NETWORK UTILITY (TCP/IP WITH HIGHER PREFERENCE THAN NAMED PIPES)
An error has occurred while establishing a connection to the server.
When connecting to SQL Server 2005, this failure may be caused by the
fact that under the default settings SQL Server does not allow remote
connections. (provider: Named Pipes Provider, error: 40 - Could not
open a connection to SQL Server)


I have also noticed that from VS2005 using the Server Explorer to add
a data connection, I can only connect to the remote SQL Server 2000 if
I use the OLEDB provider but not the SqlClient.

HOW CAN I FIX THIS? WHERE AM I GOING WRONG?

3.Problem in Connecting to my desktop SQL Server 2000 from Pocket PC 2000

Hi,

I am trying to connect SQL Server 2000 from Pocket PC emulator using
"Smart Device Applications".

I am keep getting the error "SQL Server does not exist or access denied
"

code snippet as follows

SqlConnection consql2000 = new SqlConnection("User
ID=sa;Password=xxxx;Initial Catalog=DotNetCF;Data Source=taknev;");

SqlCommand cmd = new SqlCommand("SELECT * FROM test", consql2000);
SqlDataReader dr;
try
{
consql2000.Open();
dr = cmd.ExecuteReader();
while (dr.Read())
{
listBox1.Items.Add(dr.GetString(1));
}
dr.Close();
consql2000.Close();
}
catch (SqlException ex)
{
	MessageBox.Show(ex.Message);
}

Any help??? Thanks in advance

-Venki

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

Can anyone help me with an issue. I have a .net app that tries to connect to 
my sql server here on my laptop on my company's network. When I have someone 
on the network try the app they get the following message in the errorlog:
*Timeout expired.  The timeout period elapsed prior to completion of the 
operation or the server is not responding*

I tried connecting through IP and machine name but no success. My Sql Server 
agent and Sql Server is running. I can access the data fine locally of 
course. Here is the connection string:

private string connstring = "pwd=<password>;uid=<username>;" +
            "database=projectMgr;server=<machinename>";

Here is what I'm using when the user tries to login:

  cmd.CommandType = CommandType.Text;
                cmd.Connection = sconn;
                cmd.CommandText = "SELECT username, upassword, rights FROM " +
                    "usertable WHERE username = @username AND upassword = 
@upassword";
                cmd.CommandTimeout = 30000;
            
                SqlParameter sparam = new SqlParameter(); 
                sparam = cmd.Parameters.AddWithValue("@username", user);
                sparam.DbType = DbType.String;
                sparam.Direction = ParameterDirection.Input;

                sparam = cmd.Parameters.AddWithValue("@upassword", upassword);
                sparam.DbType = DbType.String;
                sparam.Direction = ParameterDirection.Input;
                sconn.Open();
 
                mAdapter.SelectCommand = cmd;
                mAdapter.Fill(myDataTable);

                if (myDataTable.Rows.Count > 0)
                {
                    mFlag = true;
                    appObject.uClass.urights = 
myDataTable.Rows[0]["rights"].ToString();
                }
                else
                {
                    mFlag = false;
                }

I using the timeout method but it's not helping.
-- 
TC

5.Connect directly to SQL server 2000 using VB 2005

Anyone tell me how can I do in VB 2005 to connect directly my PDA with a SQL
server 2000 (connection string).

I have my aplication in VB2003 an work fine, but whem I have migrate to VB
2005 I have the error:

"SQL Server does not existe or acess denied"




6. connect ppc to SQL Server 2000 using web services

7. using Membership on production server (Copy Web Site tool) - Used to SQL Server 2000 enterprise edition

8. Problem with SQL Server 2000 on WinCE 4.2



Return to dotnet framework

 

Who is online

Users browsing this forum: No registered users and 37 guest