Results 1 to 9 of 9

Thread: Cannot connect to SQL server with my .NET???

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2003
    Posts
    9

    Angry Cannot connect to SQL server with my .NET???

    When i try to connect to a SQL database using the connect to database or datagrid ways it only allows me to connect to Access or SQL desktop engine. It states the my version of .NET does not allow????????????????
    I am using VB.Net standard version 2003. What version do i need, and why would microsoft not allow me to connect to there most popular and powerful database???
    Thanks

  2. #2
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    I dont think there is a serve explorer in VB.NET Standard edition but you should be able to connect to any DB using just code.

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2003
    Posts
    9
    through code i can, but it doesn't make sense why they have a feature that doesn't work with there own database. The book i am using as a reference tells me to use features that are not working???????? Got to love microsoft!!!!! Which version of .NET allows the "connect to database" to connect to SQL server?

  4. #4
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    In VS.NET Professional you can connect to SQL and some other sources but can only edit a local MSDE database. in VS.NET Enterprise you can open and edit most sources including a remote SQL Server.

  5. #5

    Thread Starter
    New Member
    Join Date
    Oct 2003
    Posts
    9
    is there a way to upgrade from the vb.net standard to the vb.net enterprise, or do i just have to go and buy a the full blown vb.net enterprise.
    Thanks for the input.

  6. #6
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    I don't think you can upgrade unless you are going from 2002 to 2003 and then I'm still not sure. Also there is no Visual Basic Enterprise you have to get the whole Visual Studio package. If all you want is this one feature then I'd just do it through code instead. Sooner or later you will probably end up doing it that way anyway.

  7. #7
    Frenzied Member
    Join Date
    Jan 2001
    Posts
    1,374
    Are you saying that you cannot connect to MSDE remotely using the server's IP address?

    I have only been able to connect to MSDE locally using:

    "Data Source=(local);Initial Catalog=Test;Integrated Security=SSPI"

    If I use a connection string that specifies the IP address, it won't connect.

  8. #8
    Hyperactive Member
    Join Date
    Apr 2003
    Location
    Three Rivers, MI
    Posts
    354
    crostar I have the same version of Visual Studio and the restriction is put on it because it is a "Beginners/Hobbyist" version of VS and only costs $100.

    I think MS figured that most hobbyists would only be using Access anyway (or the MSDE) and the professionals would buy the professional version with more features and the ability to connect it to their enterprise databases. It makes sense when you think about it. Why would anybody buy the higher end versions if you could accomplish everything as easily in the lower end versions?

    When I first bought the Standard version and discovered I couldn't connect to SQL server using the Server Explorer Wizards I made a copy of my SQL tables onto a MSDE Database, used the wizards to connect to it and then used Find & Replace to change all the MS made connection data pointing to the MSDE to point to the full server version.

    After doing that I couple of times I found that I didn't really like the way wizards in VS handled the data anyway and started just coding it all by hand. For the most part I don't miss the Solution Explorer database wizards because I have more control of how the data is brought to my apps when handling it myself.

  9. #9
    Addicted Member craigreilly's Avatar
    Join Date
    Jul 2004
    Location
    Scottsdale, AZ
    Posts
    188
    Here os my old codefor my Access DB:

    Code:
    sconn = "Provider=Microsoft.Jet.Oledb.4.0; Data Source=" & sAppPath & "; user id=admin; password="
            objconn = New OleDb.OleDbConnection(sconn)
            objconn.Open()
     Dim objcommand As OleDb.OleDbCommand
            Dim objrs As OleDb.OleDbDataReader
    
            objcommand = objconn.CreateCommand
    How do I change it to connect to my DSN connection of "CRM"

    Code:
    sconn="Provider=???; DSN=CRM"
    or
    Code:
    sconn = "Data Source=(local);Initial Catalog=crmdata"
    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width