Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SQLCE Compact 4 problems

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    SQLCE Compact 4 problems

    Hi,

    I am writing an indicator that uses the SQLCE functions to access a database. I created the windows forms project in visual studio, which is working, and then copied all the code to my NT indicator.

    I'm using the same references in NT as in VS. My code for opening a table and filling a datagrid view is below. the line that appears to be failing is btaProjects = new DataTable();

    It doesnt give any errors that I can see, either in the output window or the log, it just seems that it doesnt get past that line and no code after that is executed.

    I had a search in the forum for examples, but couldnt find any, at least not for this version.

    Can you help with this, or point me to any threads that have examples of using the SQL server compact edition, and which versions are supported?

    thanks,
    Will.


    SqlCeConnection btaConn;
    DataTable btaProjects;
    SqlCeDataAdapter btaAdProjects;
    BindingSource btaBdProjects;
    btaProjects = new DataTable();
    btaConn = new SqlCeConnection(btaConnectString);
    btaConn.Open();
    btaAdProjects = new SqlCeDataAdapter("Select * from backtestProjects order by name", btaConn);
    btaBdProjects = new BindingSource();
    btaAdProjects.Fill(btaProjects);
    btaBdProjects.DataSource = btaProjects;
    btaProjectsDatagrid.DataSource = btaBdProjects;
    btaConn.Close();
    Last edited by dontpanic; 04-08-2014, 07:32 PM.

    #2
    Hi Will, that topic / area would not be really supported by us unfortunately - however I remember seeing one customer issue with incorrect DLL references used from NET 4 (could only be 3.5 or lower in present NT7). What references did you add in and from which version?

    Comment


      #3
      Hi bertrand,

      Are you saying that I can only use SQLCE 3.5 or lower? I assumed that since NT was using 4.0 since the .18 upgrade I could use 4.0 aas well

      Will.

      Comment


        #4
        Will, current .NET versions include lower versions as well, so you won't notice a difference. However for adding specific DLL's from the versions only 3.5 and lower could be supported. Since it existed in 3.5 and lower, I feel would be just a matter of using compatible references - http://msdn.microsoft.com/en-us/libr...(v=vs.90).aspx

        Comment


          #5
          Hi Bertrand,

          thanks, I realised that I could use any lower version, but I was just wondering why it is only 3.5 that is supported, and not 4.0? Ist NT itself using 4.0 since version .18?

          Will.

          Comment


            #6
            Will, I'm not talking about SQL CE versions here, but the NET framework version from which you add the Dll as reference in. Here up to 3.5 is supported and also used by NT. Higher versions will come for our next major platform upgrade.

            Comment


              #7
              ok, gotcha, sorry for the misunderstanding.I will change the references to 3.5 and hopefully that will fix it.

              Thanks again,
              Will.

              Comment


                #8
                that did the trick,

                thanks,
                Will.

                Comment


                  #9
                  Ok, great to hear, thanks for the update.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  581 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  337 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  103 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  554 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  552 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X