.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

SDFs as the new MDBs?

Posted By:      Posted Date: August 28, 2010    Points: 0   Category :Sql Server
I've written programs in the past using MDBs as portable databases.  I've created and used SDFs in devices and was writing a conversion app that lets the user select an existing MDB from their desktop and I first convert the MDB into a dataset with as many tables as are in the MDB.  Got that working well though I'm not getting the schema for datatypes etc. this way.  So then I added a MDB as a new datasource and that created the XSD. But aside from that I am simple trying to create a SDF database in code from within a WinForm application so I'll have a SDF to insert the dataset into- I'm working in VS2005 Private   Function CreateSDF(ByVal ds As DataSet) As Boolean   Dim dbName As String = Path.GetFileName(txtPathtoMDB.Text)   Dim SDFPath As String = Replace(txtPathtoMDB.Text, "mdb", "sdf")   Dim ConnStr As String = SDFPath 'the following line gives this error:Format of the initialization string does not conform to specification starting at index 0." Dim SQLCEDB As New SqlCeEngine(ConnStr)  'ConnStr = "C:\NewDB.sdf" SQLCEDB.CreateDatabase()   Return True   End Function As you see above I'm getting a wierd error  just trying to create a new SDF - what am i missing.  This is allowed to create a SDF database on the desktop right?? TIA Harry

View Complete Post

More Related Resource Links

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend