Dim cn As New SqlCeConnection()
cn.ConnectionString = "Persist Security Info = False; Data Source='SalesData.sdf';" + _
"Password = '<password>'; File Mode = 'shared read'; " + _
"Max Database Size = 256; Max Buffer Size = 1024"
cn.Open()
etc
Take a look at the code in your desktop app to see what the wizards generated for you - it should be easy then to apply this knowledge to your device code.
Peter
- You can loop through the results and load items into the listbox one by one
- Use the IDE!
- Click on Data->Add Data Source
- Select the database and the tables you want to work with
- Click on Data->Show Data Sources
- In the data sources window, select the table you want to work with and change the drop down combo to 'Details'
- Click on the column you want to load into the listbox. Click on the combo arrow and select Listbox from the choice of controls.
Thanks,
Sriram Krishnan
PM, Visual Studio for Devices