Newsgroup: it.comp.lang.visual-basic
Titolo: Parola chiave 'provider' non supportata

Ciao,
con il wizard di VB2005 Express ho creato una connessione ad un
database Access. Nel file app.config mi ritrovo in automatico il
seguente codice:
"
    <connectionStrings>
        <add
name="e_Psycho.Settings.ScalePsicometricheConnectionString"
			connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=|DataDirectory|\ScalePsicometriche.mdb;User Id=admin;Password=;"
            providerName="System.Data.OleDb" />
    </connectionStrings>
"
Successivamente, nel form principale ho inserito una combo-box in cui
vorrei visualizzare i nomi di tutti i pazienti presenti in una tabella,
ho quindi scritto il seguente codice nella sezione Form_Load:
"
        Dim ConnPsycho As New
SqlConnection(My.Settings.ScalePsicometricheConnectionString)
        Dim strSQL As String = "SELECT Cognome, Nome from Pazienti"
        Dim CommandPsycho As New SqlCommand(strSQL, ConnPsycho)
"
Quando faccio partire il Debug, ottengo il seguente errore:
{"Parola chiave 'provider' non supportata."}
System.ArgumentException was unhandled
  Message="Parola chiave 'provider' non supportata."
  Source="System.Data"
  StackTrace:
       in
System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable
parsetable, String connectionString, Boolean buildChain, Hashtable
synonyms, Boolean firstKey)
       in System.Data.Common.DbConnectionOptions..ctor(String
connectionString, Hashtable synonyms, Boolean useOdbcRules)
       in System.Data.SqlClient.SqlConnectionString..ctor(String
connectionString)
       in
System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String
connectionString, DbConnectionOptions previous)
       in
System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(String
connectionString, DbConnectionPoolGroupOptions poolOptions,
DbConnectionOptions& userConnectionOptions)
       in
System.Data.SqlClient.SqlConnection.ConnectionString_Set(String value)
       in
System.Data.SqlClient.SqlConnection.set_ConnectionString(String value)
       in System.Data.SqlClient.SqlConnection..ctor(String
connectionString)
       in e_Psycho.Home.Home_Load(Object sender, EventArgs e) in
C:\ValutazioneNeuroPsicologica\e-Psycho\Home.vb:riga 20
       in System.EventHandler.Invoke(Object sender, EventArgs e)
       in System.Windows.Forms.Form.OnLoad(EventArgs e)
       in System.Windows.Forms.Form.OnCreateControl()
       in System.Windows.Forms.Control.CreateControl(Boolean
fIgnoreVisible)
       in System.Windows.Forms.Control.CreateControl()
       in System.Windows.Forms.Control.WmShowWindow(Message& m)
       in System.Windows.Forms.Control.WndProc(Message& m)
       in System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       in System.Windows.Forms.ContainerControl.WndProc(Message& m)
       in System.Windows.Forms.Form.WmShowWindow(Message& m)
       in System.Windows.Forms.Form.WndProc(Message& m)
       in
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       in
System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       in System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr
hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       in System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef
hWnd, Int32 nCmdShow)
       in System.Windows.Forms.Control.SetVisibleCore(Boolean value)
       in System.Windows.Forms.Form.SetVisibleCore(Boolean value)
       in System.Windows.Forms.Control.set_Visible(Boolean value)
       in
System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32
reason, ApplicationContext context)
       in
System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32
reason, ApplicationContext context)
       in System.Windows.Forms.Application.Run(ApplicationContext
context)
       in
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
       in
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
       in
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[]
commandLine)
       in e_Psycho.My.MyApplication.Main(String[] Args) in
17d14f5c-a337-4978-8281-53493378c1071.vb:riga 81
       in System.AppDomain.nExecuteAssembly(Assembly assembly, String[]
args)
       in System.AppDomain.ExecuteAssembly(String assemblyFile,
Evidence assemblySecurity, String[] args)
       in
Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       in System.Threading.ThreadHelper.ThreadStart_Context(Object
state)
       in System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
       in System.Threading.ThreadHelper.ThreadStart()
"
Sapreste dirmi perche'???
Grazie

 {"Parola chiave 'provider' non supportata."}
potrebbe essere kkeysensitive, prova a metterlo maiuscolo, prova a togliere 
gli apici (")
o prova a cambiare stringa!
purtroppo non so molto in VB2005
ma cmq prova con il metodo classico
st conn=createobject("adodb.connection")
non so se su vb2005 si puo fare ma cmq prova
ciao

per me è arabo!