PDA

Click to See Complete Forum and Search --> : Dat collection techniques


MyPoorLeafs
Jun 13th, 2005, 11:37 AM
Just wondering if I could get some ideas for data collection techniques. After a succession of scans, the user will have to dump this data on a PC. The PC user then has to email the data to someone else.
I'm just wondering if there are any good db utilities for CE.net out there? Should I just have the scan results posted to a text file? Just looking for ideas.
I can't use wireless so asp is out, and I think SQL would be overkill since I would need to obtain a SQL server license.
I have gotten a Pocket Access db on the scanner but cannot figure out how to make connection, recordset, etc objects to read/write to it.
I have a Symbol 9060G scanner running CE 4.2.

Thanks

Strider
Jun 14th, 2005, 03:48 AM
SQLServerCE is free there is no licence required for it so if you have a lot of data to capture and store use this.

If you have limited data use xml or csv files.

If using csv all you need do is append the data to the file.

Pocket access is not supported in the compact framework, you will need to buy 3rd party tools to access it.

MyPoorLeafs
Jun 14th, 2005, 07:40 AM
For SQLCE though...doesn't the PC (not development PC or the Windows CE device but the user) have to have IIS and SQL Server?

Do you know where I could find some sample code in writing to an xml or csv file. I'm finding it hard to find samples out there.

Thank you

Strider
Jun 14th, 2005, 08:04 AM
sqlserverce is a database that belongs to windows ce. its can exist by itself or it can be used as part of replication in a sqlserver 2000 database.
so you only need IIS if you wish to do replication on the device from a sql server


look here (http://samples.gotdotnet.com/quickstart/CompactFramework/) for beginner samples in many types of parts to the compactframework

writing to a csv is the same as writing to a file except that there are commas the represent breaks in data

MyPoorLeafs
Jun 14th, 2005, 08:56 AM
In the quickstart "SQL Server CE Database Creation" I am having problems with the following code and instructions:

Now you are going to create a database named test.sdf. The first step is to create an empty database using the System.Data.SqlCeEngine object. Note the extension of a SQL Server CE database is .sdf.



Dim engine As New SqlCeEngine("Data Source = \My Documents\test.sdf")
engine.CreateDatabase()


It says SqlCeEngine not defined.

When I go to references, I have:

system.data
system.data.common
system.data.sqlClient
system.data.SQLServeCE


No system.data.SQLCEEngine...as mentioned above.


any ideas?...am I missing something obvious?

Thanks

Strider
Jun 14th, 2005, 09:05 AM
the only references you need are
system.data.common and system.data.sqlserverce for sqlserverce

sqlceclient is for remote sql server connection.


have you Imports System.Data.SqlServerCe at the top before the beginning of your class


Imports System.Data.SqlServerCe

Public Class dbhelper
public function createdatabase()
try
Dim engine As New SqlCeEngine("Data Source = \My Documents\test.sdf")
engine.CreateDatabase()
catch ex As sqlceexception
msgbox ex.message
end try



End function


End Class

MyPoorLeafs
Jun 14th, 2005, 09:16 AM
That did it. I didn't think I would have to do an Import since I had it as a reference.

Thanks so much for your help man.

Strider
Jun 14th, 2005, 09:18 AM
reference just means they are added to the project.
However you need to import whatever functionality you require from them into your class