Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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?
    BertrandNinjaTrader Customer Service

    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
        BertrandNinjaTrader Customer Service

        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.
            BertrandNinjaTrader Customer Service

            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.
                  BertrandNinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by kaywai, 09-01-2023, 08:44 PM
                  5 responses
                  601 views
                  0 likes
                  Last Post NinjaTrader_Jason  
                  Started by xiinteractive, 04-09-2024, 08:08 AM
                  6 responses
                  22 views
                  0 likes
                  Last Post xiinteractive  
                  Started by Pattontje, Yesterday, 02:10 PM
                  2 responses
                  17 views
                  0 likes
                  Last Post Pattontje  
                  Started by flybuzz, 04-21-2024, 04:07 PM
                  17 responses
                  230 views
                  0 likes
                  Last Post TradingLoss  
                  Started by agclub, 04-21-2024, 08:57 PM
                  3 responses
                  17 views
                  0 likes
                  Last Post TradingLoss  
                  Working...
                  X