Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

OleDb Connection to SharePoint List Stuck

6 views
Skip to first unread message

David Thielen

unread,
Nov 9, 2009, 1:29:02 PM11/9/09
to
Posted at
http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/1ad511d3-9044-465e-a2bf-9fcf501d621f
5 days ago but no answer there so I'm trying here. (Also posted to SP
and then thought of here too.)

Hi.

I'm trying to connect to a SharePoint list from a SharePoint web part
using the OleDb connection string.


OleDbConnection conn = new
OleDbConnection(connString);
conn.Open();
OleDbCommand comm = new
OleDbCommand(selectString, conn);
OleDbDataAdapter adap = new
OleDbDataAdapter(comm);
DataSet dataset = new
DataSet();
adap.Fill(dataset, "list"
);

When it attempts to execute the last line, the browser will appear to
be executing but never returns, never times out, and never throws an
exception.

I'm guessing this might be a permissions problem. I created a
separate project that attempts to connect to the list using the above
code. When run it as a non-SharePoint user, it prompts for username
and password. If I provide the credentials, it works correctly. When
I run is as a SharePoint user, it does not prompt for credentials and
also runs correctly.

I'm testing on a WSS 3.0 standalone installation using Windows
Authentication.

Any help would be greatly appreciated.

david@at-at-at@windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm

Colbert Zhou [MSFT]

unread,
Nov 10, 2009, 6:20:21 AM11/10/09
to
data.oledb newsgroup is for the native oledb data provider instead of the
ADO.NET one. Actually, from the description, the problem should be more
related to the SharePoint extensive development. So the
sharepointdevelopment forum is the right place for it.


Best regards,
Ji Zhou
Microsoft Online Community Support

0 new messages