small problem with SQL DATABASe

Discussion in 'Databases' started by Tensai, Aug 19, 2010.

  1. This is the error message: System.ArgumentException: Keyword not supported: 'userid'.

    This is the connection string: "Data Source=tcp:s03.Winhost.com;Initial Catalog=DB_11752_chocolate;UserID=DB_11752_chocolate_user;Password=*****;Integrated Security=False;"/>

    I'm confused as to why I would get a message concerning the keyword "UserID"

    I have read through the other Database postings and everything ( the coding) and the connection string seems correct.

    Please Advise
    Thanks.
     
    Last edited by a moderator: Oct 14, 2015
  2. Ray

    Ray

    Try using two words "User ID". Here is an example of a connection string for the web.config file.


    <connectionStrings>
    <remove name="LocalSqlServer" />
    <add name="LocalSqlServer" connectionString="Data Source=DBServerName;Integrated Security=false;Initial Catalog=DBName;User ID=DBLogin;Password=DBPassword" providerName="System.Data.SqlClient" />
    </connectionStrings>
     
  3. Thank you.

    Funny how just a small change ie User(space)ID Changes EVERYTHING...but I stlll lovr computers and application programming :)
     
  4. Ray

    Ray

    Web.config is case sensitive and requires exact typing. This is often the cause of an application error with ASP.Net.
     

Share This Page