Keyword not supported: 'provider'.

  • Thread starter Thread starter darrel
  • Start date Start date
D

darrel

I'm getting this following error:
------------------------------------------
Exception Details: System.ArgumentException: Keyword not supported:
'provider'.
Source Error:
Line 92: Dim objOleDbAdapter as new SQLDataAdapter(strChk, strConnect)
------------------------------------------

With this bit of code:
------------------------------------------
Dim objConnect As New System.Data.OleDb.OleDbConnection(strConnect)
objConnect.Open()
Dim objCommand As New System.Data.OleDb.OleDbCommand(strChk, objConnect)
Dim objOleDbAdapter as new SQLDataAdapter(strChk, strConnect)
objOleDbAdapter.Fill(DS, "WePostings")
------------------------------------------

The problem being, I assume, is my DB connection:
<add key="DBConn" value="provider=SQLOLEDB.1;Initial
Catalog=DBCourtsPub;Data Source=APHRODITE;uid=***;pwd=***" />

Do I need an intermediary here to get the connection string 'compatible'
with the objOleDBAdapter? Google isn't turning up much for me.

-Darrel
 
'doh.

User error.

Nevermind. ;o)

For the record...

Dim objConnect As New System.Data.OleDb.OleDbConnection(strConnect)
objConnect.Open()
Dim objCommand As New System.Data.OleDb.OleDbCommand(strChk, objConnect)
Dim objOleDbAdapter as new System.Data.OleDb.OleDbDataAdapter(strChk,
strConnect)
objOleDbAdapter.Fill(DS, "WePostings")
 
Back
Top