connect ppc to SQL Server 2000 using web services

dotnet framework


  • 1. Sample code for button with BackColor?
    This is a multi-part message in MIME format. Hello, does anybody have a sample code for a button control with which it is possible to set its background color? Thanks in advance, Roberto. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META content="MSHTML 6.00.2800.1264" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT face=Arial size=2>Hello,</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>does anybody have a sample code for a button control with which it is possible to set its background color?</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Thanks in advance,</FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial size=2>Roberto.</FONT></DIV></BODY></HTML>
  • 2. write its own event loop
    I'm doing kind of custom ShowDialog() function, for a class of popping control. roughly in it I have ShowModal() { BringToFront() modal = true; while(modal) Application.DoEvents(); } the problem is, when I tru this on the desktop my CPU usage goes up to 100% I try to add a Thread.Sleep() before DoEvents(), but that doesn't help. any way of doing that without having a 100% CPU usage ?
  • 3. Version of seperate dll
    I've seen how to get the version of the currently running exe String ver = Assembly.GetExecutingAssembly().GetName().Version.ToString(); but how do i get the version of an external .dll that I link to?
  • 4. What's AGL.Form.WNT?
    Hi, I want to write a control derived from numericUpDown that will support numbers greater than signed 16-bit and also precision to 2dp. I've noticed the default constructor for the UpDownBase class takes some arguments. This is contrary to the docs in MSDN. When I declare the constructor in my derived class like this: public SuperNumericUpDown (): base (1) { } I get the following C# error CS1502: The best overloaded method match for 'System.Windows.Forms.UpDownBase.UpDownBase(AGL.Form.WNT)' has some invalid arguments What is the AGL namespace? I can't find any documentation for it anywhere, and the docmuentation I have for UpDownBase appears to be incorrect. Help!

Re: connect ppc to SQL Server 2000 using web services

Postby William Ryan eMVP » Sun, 27 Jun 2004 02:25:06 GMT

If you can consume a web service than you are 98% there.  Just add a web
method that will update a database.  You can do this through a command
object and a connection object (or a dataadapter depending on the udpate
scenario).  I'm going to assume that you can manage this part. If you need
to add any Parameter objects for the Command Object,you'll need to pass
those into the method in all likelihood.  Anyway, all you'll do is invoke
the WS, passing in whatever it needs in the way of parameters.  If you pass
in a DataSet for instance, as long as you have a dataadapter that's
configured properly it you can call update on the adapter and it will
examine the rowstate of each row and fire the corresponding
update/delete/insert command and use the columnmappings to build the
parameter collection.  Again the main challenge is in building the WS to do
the update and this isn't a Compact Framework issue at all.  After that's
built, just create your proxy/web reference to the ws and invoke it.

Let me know if you have any questions .


add data to SQL Server 2000? i've done the smartdevice walkthrough in the
msdn but then it only teaches a simple way of consuming web services such as
addition and multiplication...i've searched from google and found a .net
compact framework quickstart tutorial but it also shows only addtion and all
those calculation...thanks.


W.G. Ryan, eMVP


Similar Threads:

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


I read a lot about that and I still cannot figure it out.  So.  I'd like to
use membership into an web application that will run on a production
server(s).  On my dev machine, using Web dev Xpress 2008 and SQL Server
Xpress 2008, all is well.  My Aspnetdb.mdf is running fine in my App_data

When I use the copy website utility to transfer all this on a "test"
production server and try to login or anything, I'm getting the predictable
"Failed to generate a user instance of SQL Server due to a failure in
starting the process for the user instance."

Now, my "test" prod server runs .NET 3.5, IIS 6, SQL server 2000 (Std
Edition) and SQL server Xpress 2008.  I could install SQL 2008 Standard if
necessary but for now we were delaying this.  I could do the same on real
prod servers when ready.

I have many questions :

1) What do I need to have and to configure on my prod server (SQL Server 
2008 XPress or 2000 Standard or anything else) to use Membership with 
Aspnetdb.mdf in a App_data directory ?

2) Is it possible to use many concurrent secure Web app on a production
server, using separate membership structure based on separate Aspnetdb.mdf 
each App_data directory of each app?

3) Do I have to use SSL connection to keep secure "Username /Password" use
during login ?

4) Is it a good rule to use the App_data for other application databases
(Inventory, parts catalog, orders and financial data, ...) and how to 
safely their use with the Role/membership structure ?

4) Is it possible/suitable to have a "mixed model", using Windows
Authentification to get in the app zone, login in (to identify more 
the user) afterward ?  And why is it or is not a good way to go ...

Thanks anyway and have a good day !

"Who's on first ..." 

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


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;
dr = cmd.ExecuteReader();
while (dr.Read())
catch (SqlException ex)

Any help??? Thanks in advance


3.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>;" +

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 = 
                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;
                mAdapter.SelectCommand = cmd;

                if (myDataTable.Rows.Count > 0)
                    mFlag = true;
                    appObject.uClass.urights = 
                    mFlag = false;

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

4.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" to connect to sql server 2000 using emulator 4.2

   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
   sscerepl.SubscriberConnectionString = lconnstr; //conn string for the
local SQLCE DB

   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

6. connect to SQL Server using PPC

7. Web Services on Win 2003 to SQL Server on Win 2000

8. unable to connect from Windows 2000 after SQL server Resta

Return to dotnet framework


Who is online

Users browsing this forum: No registered users and 13 guest