SQLCE Workshop III - Getting started with 3.5 Beta

  • Comments posted to this topic are about the item SQLCE Workshop III - Getting started with 3.5 Beta

    .

  • Still really curious about that great set of questions in article #2, esp

    Designing the database schema

    How do I design my database schema, modify and manage the database objects? What designer can I use? Is it really handy? What are the tools that I can use to connect to my SQL Server CE database to view and manage my data? How do I create a database diagram?

    Business Intelligence and Reporting

    Will I be able to create Business Intelligence applications on top of my database? Will I be able to use Reporting services? Will the ReportViewer work with my database?

    Schema Management

    Pros and Cons

    What are the capabilities and what are the limitations of SQL Server CE?

    Administration

    What if my database grows? Do I need to worry before it is 4 GB? Will the performance be good enough? What do I do if the database still grows? Does it work on a multi-user environment? What are the administrative activities needed?

    TSQL Programming

    SSCE does not support Stored Procedures, Triggers and Views. Will it affect me and my development team in any manner? How do I organize and manage my database queries/code for better maintainability and productivity?

    Synchronization

    How do I synchronize my SSCE database with a central Server? Can I synchronize with an external server (outside my local network)? Do I need direct access to the server? What if the server is behind a firewall? Is there a way to do a sync through a Web Service? Can I sync with a different database server, say Oracle or DB2? What is Remote Data Access and How do my applications benefit from it?

  • Hows come using the below code I never see any data in my database?

    SqlCeConnection conn = null;

    SqlCeTransaction trans = null;

    try

    {

    conn = new SqlCeConnection(@"Data Source=|DataDirectory|\MediaLister.sdf");

    conn.Open();

    trans = conn.BeginTransaction();

    SqlCeCommand insertMedia = conn.CreateCommand();

    String insertMediaSql = "INSERT INTO Media(MediaName, MediaType, MediaLength, MediaDescription)";

    insertMediaSql = insertMediaSql + String.Format("VALUES ('{0}','{1}','{2}','{3}')","MediaName", "DVD", "MediaLength", "MediaDescription");

    // "VALUES (@MediaName, @MediaType, @MediaLength, @MediaDescription)";

    insertMedia.Transaction = trans;

    insertMedia.CommandText = insertMediaSql;

    //insertMedia.Parameters.Clear();

    //insertMedia.Parameters.AddWithValue("@MediaName", this.MediaNameTB.Text);

    //insertMedia.Parameters.AddWithValue("@MediaType", this.MediaTypeDDL.Text);

    //insertMedia.Parameters.AddWithValue("@MediaLength", this.MediaLengthTB.Text);

    //insertMedia.Parameters.AddWithValue("@MediaDescription", this.MediaDescTB.Text);

    insertMedia.ExecuteNonQuery();

    trans.Commit(CommitMode.Immediate);

    }

    catch (SqlCeException ex)

    {

    System.Windows.Forms.MessageBox.Show(ex.Message);

    }

    finally

    {

    if (conn != null && conn.State == ConnectionState.Open)

    {

    conn.Close();

    }

    }

  • After building the INSERT QUERY, try to print it in debug mode and see if it looks correct..Then try to execute the query in management studio you could spot the problem quickly.

    .

  • I get this error message:

    Reference required to assembly 'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' containing the base class 'System.Data.Common.DbConnection'. Add one to your project.C:\CDR\DEMsql\DEMsql\clsDEMsqlServerCE.vb

    I have System.Data referenced, it's 3.5 not 2.0 but even after dropping 3.5 and adding 2.0 it didn't help. Ideas?

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply