CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2008
    Posts
    6

    Unhappy sql connectivity

    Hi

    In my web form i am having two listboxes, i need to pass values from one listbox to the other and need to save the contents of the second listbox

    i had done upto this

    while saving to my sqldatabase i am getting the following error


    CANNOT BE SAVED INTO THE DATABASE KEYWORD NOT SUPPORTED:'PROVIDER'
    but the same program is working with access database

    i have used the following connection string for connecting to the database
    conn = New SqlConnection("Provider=SQLOLEDB;DataSource=\sqlexpress;attachdbfile=\datadirectory\map.mdf;integrated Security=True;userinstance=true")

  2. #2
    Join Date
    Jun 2004
    Location
    Kashmir, India
    Posts
    6,808

    Re: sql connectivity

    In ADO.NET you don't need a provider for connecting to the SQL Server. You will have to use SQLConnection class. Look at System.Data.SQLClient namespace on MSDN.

  3. #3
    Join Date
    Mar 2008
    Posts
    72

    Re: sql connectivity

    Look at www.connectionstrings.com for help with, well, connection strings.

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

Featured