|
-
Mar 16th, 2007, 11:23 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] New to VB.NET and SQLServerCE
I am sort of an old timer, .NET is somewhat new to me as I am a VB6 leftover. So to help me and maybe others, I am detailing my first experience with .NET and SQLServerCE development on Windows CE 5.0. I have done some reading, but seems pretty confusing with all the versions of Sql and Windows mobile.
My goal in this thread is to programtically create a sql db, add fields and data, and add the ability to add, edit, and query data on my handheld mobile device.
Here is where I started:
Code:
Imports System.Data.SqlServerCe
Public Class Form1
Private Sub cmdCreateDb_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCreateDb.Click
Try
Dim engine As New SqlCeEngine("Data Source = \My Documents\test.sdf")
engine.CreateDatabase()
MsgBox("Db creation complete!")
Catch ex As SqlCeException
MsgBox(ex.Message)
End Try
End Sub
End Class
At this point, when I click the button CreateDb, it seem the file 'test.sdf' is created since when I click it twice it says file already exists, 
I have two questions at the point:
1) I am testing using the emulator for PocketPC 2003 SE image. Is it possible to see the file on the emulator file system?
2) Is there a way to design Sql tables for SqlServerCe in a visual intercface?
Next, I will attempt to create a table and add fields to the table.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|