Results 1 to 6 of 6

Thread: [Resolved] Simple application without remote access

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2005
    Posts
    79

    Thumbs up [Resolved] Simple application without remote access

    Hi

    I wish to develop an application for Pocket PC, that have Windows CE, I need to:
    - Upload data from PC to Pocket PC using ActiveSync
    - Maintain data on Pocket PC using Pocket PC database (SQL CE, or whatever)
    - Download data to PC from Pocket PC using ActiveSync

    SQL CE requires IIS, my Pocket PC application does not require any online interaction with any other server or device. Is it necessary to install IIS or SQL CE to achieve my objective?

    I am trying to create a Smart Device Application on VB .Net, the toolbox of design environment is not showing the Data Controls. What controls I should use for database handling?

    Please guide me for this.

    Thanks

    karahim
    Last edited by karahim; Sep 13th, 2005 at 10:09 PM. Reason: resolved

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Simple application without remote access

    I think you will have a harder time NOT installing SQL CE. It seems to install itself whenever you are using a PDA as a test platform. I have not heard about needing IIS on the PDA, but I have never dealt with it, either. SQL CE is a pretty good database for use on the PDA, so you might as well use it.

    What form of data are you uploading?
    My usual boring signature: Nothing

  3. #3
    Fanatic Member Strider's Avatar
    Join Date
    Sep 2004
    Location
    Dublin, Ireland
    Posts
    612

    Re: Simple application without remote access

    -sqlce only requires IIS when using Remote Data Access (RDA), and IIS will be installed on a server.
    -sqlce is free for the device, i.e: no licencing required

    -in Compact framework you need to code all your database handling
    look here -> http://samples.gotdotnet.com/quickst...pactFramework/ for code examples
    Barry


    Visual Studio .NET 2008/Visual Studio .NET 2005/Visual Studio .NET 2003
    .NET Framework 3.0 2.0 1.1/ASP.Net 3.0 2.0 1.1/Compact Framework 1.0

    SQL Server 2005/2000/SQL Server CE 2.0


    If you like, rate this post

    Compact Framework for Beginners

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Feb 2005
    Posts
    79

    Re: Simple application without remote access

    Thanks Shaggy Hiker and Strider for your replies.

    From a document on internet i read that IIS needs to be installed on server before installing SQLCE on handheld, that is what i was trying to get clarification on it. Now it is understood from Strider's reply that IIS is not required if not using remote access.

    Shaggy, data that i was talking about are a number of SQL tables having codes and description columns in it, which i have to populate in combo boxes of my handheld application.

    Strider, site that you mentioned seems to be very helpful for me.
    I learnt from somewhere that to install SQLCE on handheld, include SQL Server CE in your project, on the Project menu, click Add Reference, and select System.Data.SqlServerCe. I followed this but data control is still not appearing in form desining environment.

    It would be great if you could provide me a sample code that suits my situation.

    Regards

    karahim

  5. #5
    Fanatic Member Strider's Avatar
    Join Date
    Sep 2004
    Location
    Dublin, Ireland
    Posts
    612

    Re: Simple application without remote access

    These are samples only, copying and pasting these samples may need some changes

    There are no data designer tools in the compact framework everything is done by code, which is much better

    VB Code:
    1. 'creating connection to database
    2. Dim l_conn As New New SqlCeConnection("Data Source=\My Documents\test.sdf"
    3.  
    4. 'Creating a table
    5. Dim l_sqlcmd As SqlCeCommand = l_conn.CreateCommand()
    6.  
    7. l_sqlcmd.CommandText = "Create TABLE tbl_Customers(CustomerNo int PRIMARY KEY, CustomerName nvarchar(30), Addr1 nvarchar(30), Addr2 nvarchar(30), Addr3 nvarchar(30), Addr4 nvarchar(30))"
    8. l_sqlcmd.ExecuteNonQuery()
    9.  
    10. 'Executing SQL Command
    11. Dim sqlcmd As SqlCeCommand = l_conn.CreateCommand()
    12. sqlcmd .CommandType = CommandType.Text
    13. sqlcmd.CommandText = "SELECT * FROM tbl_Customers
    14. sqlcmd.ExecuteNonQuery()
    15. 'or
    16. sqlcme.ExecuteScalar()
    17. 'or
    18. Dim l_dr As DataReader
    19. l_dr = sqlcmd.ExecuteNonQuery()
    20.  
    21. 'using dataadapter
    22. Dim sqlDA As SqlCeDataAdapter
    23. Dim ds As New DataSet
    24.  
    25. 'Select everything from the table.
    26. sqlDA = New SqlCeDataAdapter("SELECT * FROM tbl_Customers, l_conn)
    27.  
    28. 'Fill the DataTable within the DataSet.
    29. sqlDA.Fill(ds, "DataSet")
    Barry


    Visual Studio .NET 2008/Visual Studio .NET 2005/Visual Studio .NET 2003
    .NET Framework 3.0 2.0 1.1/ASP.Net 3.0 2.0 1.1/Compact Framework 1.0

    SQL Server 2005/2000/SQL Server CE 2.0


    If you like, rate this post

    Compact Framework for Beginners

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Feb 2005
    Posts
    79

    Re: Simple application without remote access

    Thanks alot Strider for sample code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width