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

SQL Server Database

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

    SQL Server Database

    Hi,

    I'm building a script that exports to a SQL Server database. But for some reason I cannot do:

    using System.Data.SqlClient;

    Does NT not support it?

    #2
    Hello siroki,

    We do not support this but you should be able to do it with custom code. Do you know what .NET version of your SQL that you are using?

    NinjaTrader will only be able to use .NET 3.5 and below versions.
    JCNinjaTrader Customer Service

    Comment


      #3
      I'm using the latest .NET version and Visual Studio 2012 and SQL Server 2012. Im trying to program it with a custom script. Can you point me in the right direction? Maybe using System.Data.SqlClient was not available in .NET 3.5?

      Comment


        #4
        Hello siroki,

        Looking at MSDN's website it looks like this is available from .NET 1.1 to 4.5

        The System.Data.SqlClient namespace is the .NET Data Provider for SQL Server.


        What errors are you having? Do when you compile the script inside of NinjaTrader do you get an error?
        JCNinjaTrader Customer Service

        Comment


          #5
          When I type in > using System." the intellisense doesn't show Data. So I think for some reason it's not in the System collection available.

          When I just type it in (using System.Data / using System.Data.SqlClient) it gives an error "The type or namespace Data does not exist in the namespace System.. Which is correct because I already saw that through Intellisense..

          For what it's worth. I've just created a project in Visual Studio and get no errors there...

          I've checked RegEdit and all the proper .net versions are installed including 3.5 and 4.0.. I'm running Windows 8.1
          Last edited by siroki; 05-01-2014, 11:42 AM.

          Comment


            #6
            I think I've located the issue. I needed to Add Reference to System.Data (right click in the script, add reference). Seems to be working now.

            Comment


              #7
              Hello siroki,

              Thanks for the update.

              Any new Namespaces that you add you will want to make sure that you have the assembly that goes with them. By Default NinjaTrader only references, System, System.Core, System.Drawing, System.Windows.Forums, and System.XML so any other namespaces defined in other assemblies you will have to reference them as well.
              JCNinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by kempotrader, Today, 08:56 AM
              0 responses
              6 views
              0 likes
              Last Post kempotrader  
              Started by kempotrader, Today, 08:54 AM
              0 responses
              4 views
              0 likes
              Last Post kempotrader  
              Started by mmenigma, Today, 08:54 AM
              0 responses
              2 views
              0 likes
              Last Post mmenigma  
              Started by halgo_boulder, Today, 08:44 AM
              0 responses
              1 view
              0 likes
              Last Post halgo_boulder  
              Started by drewski1980, Today, 08:24 AM
              0 responses
              4 views
              0 likes
              Last Post drewski1980  
              Working...
              X