Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unable to connect to database - Data Source

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

    Unable to connect to database - Data Source

    Hello,
    I'm getting an error message which says:
    Unable to connect to database 'Data Source= "C:\Users\(My name)\Documents\Ninjatrader 7\db\Ninjatrader.sdf": ObjectSpace: Connection String is Invalid - Exception has been thrown by the target of an invocation.

    Could you please help?

    Thanks
    Nellie

    #2
    Does this message appear when attempting to open from the 32-bit and 64-bit shortcuts? Or does it only occur with the 64-bit shortcut?

    What is the size of your database file? To check, follow these steps:
    • Navigate to Documents > NinjaTrader 7 > Double left click on the 'db' folder
    • Right-click on 'NinjaTrader.sdf' (may only say 'NinjaTrader' depending on your Windows settings) > Properties
    • Tell me the size

    Comment


      #3
      I open it from a 64-bit shortcut. The size of the database file is 16.5mb.

      Comment


        #4
        Thanks for confirming which shortcut you use. Can you confirm if the same symptom occurs if you open from the other shortcut named "NinjaTrader 7"? This is the 32-bit shortcut and it automatically created on your desktop when you install NinjaTrader.

        Comment


          #5
          I don't have the other shortcut (32-bit one) on the desktop anymore. Can you please tell me where is it located and I'll give it a try.

          Comment


            #6
            If the 32-bit shortcut is no longer on your desktop, please open Windows File Explorer and go to C > Program Files (x86) > NinjaTrader 7 > bin > right click on NinjaTrader.exe > send to > Desktop. This will create a shortcut to the 32-bit version of NinjaTrader on your desktop.

            Comment


              #7
              It works now, thank you!

              Comment


                #8
                Thanks for confirming that the 32-bit version works. It is actually preferrable to use the 64-bit version so please follow the steps below to get that version working again.

                NinjaTrader requires various Microsoft components to run, one of which is SQL compact Edition. Currently, you may not have SQL Compact Edition or possibly have the incorrect version of SQL Compact Edition installed.

                Please follow the below steps to ensure the correct version of SQL Compact Edition is installed on your PC.
                • Navigate to the Windows Control Panel
                • Add and remove software/programs
                • Uninstall any SQL Compact Editions you see, if none are present you may ignore this step and continue with the next step
                • Install latest SQL Compact Edition 3.5. SP2 which is available here: Download Here
                • Once you run the downloaded file it will ask you for a directory to extract the installer to. Point this to a temporary directory that you will be able to quickly locate later, such as the desktop
                • Navigate to the aforementioned directory in which the files have been extracted to
                • Run the file named SSCERuntime-ENU.exe in which you will want to extract to this directory once more (there will be two files)
                • SSCERuntime_x86-ENU.msi - Run this one first
                • SSCERuntime_x64-ENU.msi - No need to run this if you are on a 32 bit system, if you are on a 64 bit system you will also need to run this file, if you are not sure if you have a 64 bit system go ahead and run this file. If you are not using a 64 Bit operating system, the installer will cancel itself automatically
                • Follow the installation steps outlined in the installation wizard
                • Once installed you will need to restart your PC
                • You will now be able to launch NinjaTrader 7

                Comment


                  #9
                  I am getting this same message. I followed all instructions on previous post and restarted computer but no luck. Please advise next steps to repair NT7. Thanks

                  Comment


                    #10
                    Please clarify - this occurs when using the 32-bit and 64-bit shortcut? Or does it occur only when using the 64-bit version?

                    Comment


                      #11
                      I am also getting the same error while opening NinjaTrader 7 32-bit.

                      Unable to connect to database 'Data Source= "C:\Users\(My name)\Documents\Ninjatrader 7\db\Ninjatrader.sdf": ObjectSpace: Connection String is Invalid - Exception has been thrown by the target of an invocation.

                      Please find the attached trace reports and logs and let me what should I do to run my NinjaTrader 7.

                      Attached Files

                      Comment


                        #12
                        Hello Hemant,


                        NinjaTrader requires various Microsoft components to run, one of which is SQL compact Edition. Currently, you may not have SQL Compact Edition or possibly have the incorrect version of SQL Compact Edition installed.

                        Please follow the below steps to ensure the correct version of SQL Compact Edition is installed on your PC.
                        • Navigate to the Windows Control Panel
                        • Add and remove software/programs
                        • Uninstall any SQL Compact Editions you see, if none are present you may ignore this step and continue with the next step
                        • Install latest SQL Compact Edition 3.5. SP2 which is available here: Download Here
                        • Once you run the downloaded file it will ask you for a directory to extract the installer to. Point this to a temporary directory that you will be able to quickly locate later, such as the desktop
                        • Navigate to the aforementioned directory in which the files have been extracted to
                        • Run the file named SSCERuntime-ENU.exe in which you will want to extract to this directory once more (there will be two files)
                        • SSCERuntime_x86-ENU.msi - Run this one first
                        • SSCERuntime_x64-ENU.msi - No need to run this if you are on a 32 bit system, if you are on a 64 bit system you will also need to run this file, if you are not sure if you have a 64 bit system go ahead and run this file. If you are not using a 64 Bit operating system, the installer will cancel itself automatically
                        • Follow the installation steps outlined in the installation wizard
                        • Once installed you will need to restart your PC
                        • You will now be able to launch NinjaTrader 7

                        Also I see that you're running an older version of NinjaTrader 7. The newer version contains many critical updates to the database. Please update NinjaTrader 7 and reset your instruments:

                        First, to update NinjaTrader, please follow the steps below:
                        • First get your license key from NinjaTrader under Help> License Key then exit NinjaTrader
                        • Click on the link: https://ninjatrader.com/PlatformDirect
                        • Enter your license key and press Submit
                        • Under 'Prior Releases' select the version next to 'NinjaTrader 7' to begin your download.
                        • Critical: Before running the installer, ensure NinjaTrader is closed.

                        Next to reset your instruments, please follow the steps below:
                        • Disconnect from your data feed: NinjaTrader Control Center> File> Disconnect> Select your data feed
                        • Reset your Instruments: NinjaTrader Control Center> Tools> Options> Data tab> Reset Instruments>OK
                        • Restart NinjaTrader> Connect (NinjaTrader Control Center> File> Connect> Select your connection
                        Also I suggest removing your attached files as these files can contain sensitive information.
                        Christopher J.NinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by ghoul, Today, 06:02 PM
                        0 responses
                        7 views
                        0 likes
                        Last Post ghoul
                        by ghoul
                         
                        Started by Barry Milan, Yesterday, 10:35 PM
                        6 responses
                        18 views
                        0 likes
                        Last Post Barry Milan  
                        Started by DanielSanMartin, Yesterday, 02:37 PM
                        2 responses
                        13 views
                        0 likes
                        Last Post DanielSanMartin  
                        Started by DJ888, 04-16-2024, 06:09 PM
                        4 responses
                        13 views
                        0 likes
                        Last Post DJ888
                        by DJ888
                         
                        Started by terofs, Today, 04:18 PM
                        0 responses
                        12 views
                        0 likes
                        Last Post terofs
                        by terofs
                         
                        Working...
                        X