c# 2003.net connection

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tselvaa
    New Member
    • Jul 2008
    • 1

    c# 2003.net connection

    I have problem with the connection in c#.net 2003. when I am trying to connect with sql 2005 server this error will appear.
    An unhandled exception of type 'System.NullRef erenceException ' occurred in system.data.dll

    Additional information: Object reference not set to an instance of an object.

    but my connection string works with c#.net 2005. what is the problem with the environment?

    my connection string is
    string constring="Pers ist Security Info=False;User ID=sa;Initial Catalog=DFNEWDB ;Data Source='TSELVAA \\SQL2005'; Packet Size=4096;Works tation ID='TSELVAA'";
    SqlConnection con =new SqlConnection (constring);
    con.Open ();
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    Did .NET1.1 event have the SqlConnection class? I was pretty sure you used to have to use the OLE stuff?

    Comment

    Working...