PDA

Click to See Complete Forum and Search --> : How dataset save to sqlce?


simoms
Mar 29th, 2005, 02:04 AM
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. :blush:

Shaggy Hiker
Mar 29th, 2005, 09:49 AM
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?

simoms
Mar 30th, 2005, 01:04 AM
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.

Strider
Mar 31st, 2005, 08:45 AM
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