Loading Contents of a List into Memory VB.net 2003

  • Thread starter Thread starter Atley
  • Start date Start date
A

Atley

I want to be able to take a simple select statement from my SQLce database
and load its results into memory on my device so they can be pasted into
another app to be emailed or whatever else the user decides to do with it.

Any thoughts or ideas?
 
Using a SqlCeDataAdaptor will fill a DataSet in memory from your database
table, however if you want to place items as text on the clipboard you will
need to P/Invoke the Clipboard API functions - or you could use a ready made
library - see OpenNETCF Forms (www.opennetcf.org/forms.asp) which includes a
Clipboard class which allows you to cut and paste text to/from the
clipboard.

Peter
 
Well, if you use any of the ADO.NET connected objects, DataSet/DataTable, it
will be loaded locally into memory. If you load it into a DataSet, you can
use its .WriteXML method and save it to a file or stream...then, once it's
serialized, you can grab it from other applications..

HTH,

Bill
 
Do you know of anywhere I can find more information on this method? Maybe
an example on the net?

Thanks
 
Where would I find more information on the Clipboard API functions and
P/Invokeing them? I am using VB.net 2003... are there any examples to be
found on the net?

Thanks for the help!
 
You can either use a ready-made example - such as in our shared-source Smart
Device Framework
www.opennetcf.org/smartdeviceframework.asp

Or you'll need the Pocket PC SDK documentation see OpenClipboard,
GetClipboardData and SetClipboardData functions. Your best bet is probably
to look at the sdf source (which although is C# will give you an idea of how
to call the functions in VB) or just use the SDF as-is - no P/Invoke
required!

Peter

--
Peter Foot
Windows Embedded MVP
OpenNETCF.org Senior Advisor
www.inthehand.com | www.opennetcf.org
 
Back
Top