Results 1 to 4 of 4

Thread: How dataset save to sqlce?

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2005
    Posts
    56

    How dataset save to sqlce?

    I am using vb.net to write pocket pc application.
    now, I created a dataset, and would like to store in the sqlce.

    my English not very well...sorry.

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

    Re: How dataset save to sqlce?

    It'll do, what's the problem?

    From your post, I assume that you are already at least a little familiar with ADO. Do you have a database already?
    My usual boring signature: Nothing

  3. #3

    Thread Starter
    Member
    Join Date
    Mar 2005
    Posts
    56

    Re: How dataset save to sqlce?

    Quote Originally Posted by Shaggy Hiker
    It'll do, what's the problem?

    From your post, I assume that you are already at least a little familiar with ADO. Do you have a database already?
    NO, the database not exist..
    Now, I change the method, it is using programe to create the database, then save the table to data set, finally using dataset create the xml...It work..but not the best solution..
    I have the question is writing the sql command, hope can help,
    why it cant work?
    Dim mycommand1 As New SqlCeCommand("select * from Appointments where Day > " & date.today.today & "", cn)

    I just want to compare the Day, if expired then not show in datagrid.

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

    Re: How dataset save to sqlce?

    Hi
    try using date.Today.Day to get todays Day.

    or if you are using full dates you can compare the no of days using sqlce built in function of DATEDIFF (d, OrderDate, ShippedDate)

    Dim mycommand1 As New SqlCeCommand("select * from Appointments where Day > " & date.today.today & "", cn)



    also execute the command as scalar so it will return you a value if you are using the datediff
    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

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