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
VB Code:
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





Reply With Quote