Click to See Complete Forum and Search --> : sql connectivity


NKarthick
April 9th, 2008, 02:20 AM
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")

Shuja Ali
April 9th, 2008, 03:13 AM
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.

MikeVallotton
April 15th, 2008, 08:49 AM
Look at www.connectionstrings.com for help with, well, connection strings.