Now fire up your Sharepoint Designer 2010 and if you don't have one, you can download it here, once you are in, open your Team Site, then choose external content type, then create a new one:
Once you click that, it will open the Content Type Definitions, now place your Content Type Name, then click External System to define your Database Connection:
Now click Add Connection:
It will ask you different data source types, you can choose from .Net Type, WCF Service and SQL Server. We are now interested in SQL Server which lets you connect to a SQL Server Database. But before we move ahead, I will discuss a bit on the other two types as this adds flexibility on the Data Connections you might need later on. First it is a .NET Type which allows you to connect to a .NET Assembly which might be a third party or you developed it on your own and the next type is a WCF Service which lets you connect to a Webservice or a Metadata Exchange.
Ok, back to choosing SQL Server Connection, choosing it will prompt you to set the connection parameters:
Once you set it, your database objects will now be available on the Data Source Explorer.
Now choose the Table you need to expose and right click on it and create the operation you need. In this case, we select all operations so it will do read item, read list, create, update and delete in one shot.
Now, it will ask you some Operation Properties and Parameters, we will just click through next during the whole process.
Now the Parameters Configuration, we will just click next for now, but in short this window will:
Now the Filter Parameter - this will let you filter the results the external list is grabbing from SQL so that it won't be slow loading the Sharepoint page especially if you have lots of rows. But for now, we also click next and let the default values handle it.
Now at this point, you have created the needed operations for the table you have chosen.
Now save your work by clicking that diskette icon on top:
Once you click that, it will open the Content Type Definitions, now place your Content Type Name, then click External System to define your Database Connection:
Now click Add Connection:
It will ask you different data source types, you can choose from .Net Type, WCF Service and SQL Server. We are now interested in SQL Server which lets you connect to a SQL Server Database. But before we move ahead, I will discuss a bit on the other two types as this adds flexibility on the Data Connections you might need later on. First it is a .NET Type which allows you to connect to a .NET Assembly which might be a third party or you developed it on your own and the next type is a WCF Service which lets you connect to a Webservice or a Metadata Exchange.
Ok, back to choosing SQL Server Connection, choosing it will prompt you to set the connection parameters:
Once you set it, your database objects will now be available on the Data Source Explorer.
Now choose the Table you need to expose and right click on it and create the operation you need. In this case, we select all operations so it will do read item, read list, create, update and delete in one shot.
Now, it will ask you some Operation Properties and Parameters, we will just click through next during the whole process.
Now the Parameters Configuration, we will just click next for now, but in short this window will:
- configure the Data Source Elements on that table
- require a field on save
- define the field as a time stamp
- show the field on the picker if you use this as a reference field on another Sharepoint list
- and lots more
Now the Filter Parameter - this will let you filter the results the external list is grabbing from SQL so that it won't be slow loading the Sharepoint page especially if you have lots of rows. But for now, we also click next and let the default values handle it.
Now at this point, you have created the needed operations for the table you have chosen.
Now save your work by clicking that diskette icon on top:
No comments:
Post a Comment