none
c# Wpf - Keyword not supported: "version".. RRS feed

  • Question

  • Hey.

    Everytime we try to run our code we get the error

    'Keyword not supported: "version"'

    We tried to change the version number many times but it keep sending us the same error message. 

    Our code is this:

    string dbOpretBestilling = @"Data Source=db_owner.Bestillinger;Version=10.50.2500;";
                SqlConnection conn = new SqlConnection(dbOpretBestilling);

    Really hope you can help us !!

    Tuesday, December 9, 2014 10:35 PM

Answers

  • You're using SqlConnection which would seem to indicate you're trying to connect to SQL server. Version is not a valid connection string property on a SQL connection string.

    If you're not using SQL server then you shouldn't be using SqlConnection but rather the provider for your database (or OleDbConnection Or OdbcConnection if you're going that route).

    Michael Taylor
    http://blogs.msmvps.com/p3net

    Monday, December 15, 2014 10:17 PM
    Moderator
  • See webpage below.  It looks like you are using a custom ODBC provider.  Do you have the provider installed on the PC.  Check Control Panel : Administrative Tools : ODBC Data Source

    http://www.connectionstrings.com/sql-server/


    jdweng

    Wednesday, December 10, 2014 4:18 AM

All replies

  • See webpage below.  It looks like you are using a custom ODBC provider.  Do you have the provider installed on the PC.  Check Control Panel : Administrative Tools : ODBC Data Source

    http://www.connectionstrings.com/sql-server/


    jdweng

    Wednesday, December 10, 2014 4:18 AM
  • Yes i have exactly! 

    ODBC Data Sources both (32 & 64-bit)

    Is that a good thing or? :-)

    Thank you for the fast answer btw!

    Wednesday, December 10, 2014 7:30 AM
  • Have you tried the connection string on link provided?  Your connection string doesn't look like any on the webpage.

    jdweng

    Wednesday, December 10, 2014 9:39 AM
  • You're using SqlConnection which would seem to indicate you're trying to connect to SQL server. Version is not a valid connection string property on a SQL connection string.

    If you're not using SQL server then you shouldn't be using SqlConnection but rather the provider for your database (or OleDbConnection Or OdbcConnection if you're going that route).

    Michael Taylor
    http://blogs.msmvps.com/p3net

    Monday, December 15, 2014 10:17 PM
    Moderator