Please consider registering
guest

Log In Members

Lost password?
Advanced Search:

— Forum Scope —



— Match —



— Forum Options —




Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
"sharepoint 2010" read list items from database
April 11, 2012
6:45 pm
Harold
Guest

Maybe this is a silly question but i am not getting any specific answers to it on google.

 

We want to develop custom code to display data from SQL into our SharePoint site page. It should look exactly like Listview webpart's view but pulls data from SQL not sharepoint.

I am desperately looking for any good example for this …actually any example would do to get me started.

any help is highly appreciated.

Harold

April 13, 2012
2:36 am
Admin
Forum Posts: 212
Member Since:
May 30, 2010
Offline

Hi Harlod.

 

Welcome to the Forum.

 

You can use the infamous "ListView Control" and bind it with SQL data.

 

here is a good example from Microsoft -> http://msdn.microsoft.com/en-u…..98790.aspx

 another example -> http://sanjayapdl.wordpress.co…..matically/

 

Enjoy!

April 14, 2012
6:11 pm
Darren Hemming
Guest

Or just use SharePoint Designer to make a Data View. Quicker and more flexible than C#.

 

1. In SPD, create a new data source pointing to your SQL – I assume the data will be security trimmed to the current user.

2. Create a new data view based on that data source

3. Tweak the XSLT to transform how the data is presented. You can mostly do this in design mode, but some HTML/CSS/Javascript tweaks may need edit mode.

 

There's no need to heavily format the data in SPD if you create some decent views (stored procs) in SQL – keeps the processing close to the source data.

 

OR if there's isn't actually that much data, build an external content type in SPD to sync your SQL data with a SharePoint list – then you can just add the list to your page as a web part.

 

All without a line of C#. Best of luck with it.

July 30, 2012
7:51 am
Angela Lee
Guest
Sharepint Data Connector 

can connect SharePoint list to database; Transfer business data between SharePoint list and External data, import external data to SharePoint list, or export SharePoint list to SQL, Oracle, or MySQL
Forum Timezone: UTC 0

Most Users Ever Online: 91

Currently Online:
14 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Member Stats:

Guest Posters: 1113

Members: 16881

Moderators: 0

Admins: 1

Forum Stats:

Groups: 3

Forums: 10

Topics: 1141

Posts: 2551

Administrators: Learning SharePoint (212)