Announcement

Collapse
No announcement yet.

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 Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              637 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              366 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              107 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              569 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              571 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X