Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I've got a need to provide simple table editing for a few tables in a different database from the Umbraco installation. Can Dewd handle this, ie a seperate connection string/DSN?
Sure thing. You can specify another connection string on both the container and repository elements in the config-file. So if you've grouped the tables/repositories in a container, you can add the connection-attribute with your custom DSN, like this:<dewd> <container name="External database" connection="Server=myServerAddress;Database=myDataBase..."> <repository name="Repo 1" /> <repository name="Repo 2" /> <repository name="Repo 3" /> <container></dewd>Hope that makes sense.
Btw. if you need to connect to a database, that isn't supported by Umbraco, you need to create a custom editor/view based on the Table*-classes, but it isn't difficult.
Sune - thanks, that works great! I missed it in the docs, I should RTFM ;-)
Haha, no prob.
So for editor/view do i need to edit your source code?
No. To create a new editor/view/repository you can specifiy your own type on the tag in the xml-file, like this.<dewd> <repository name="Languages" icon="mediaFile.gif"> <view name="All" type="yourowntype,yourownassembly"> </view> <editor tableName="umbracoLanguage" type="yourowntype,yourownassembly"> <field title="ISO code" sourceField="languageISOCode" umbracoDataType="Textstring" /> <field title="Culture name" sourceField="languageCultureName" umbracoDataType="Textstring" /> </editor> </repository></dewd>And then you can just inherit from one of the build-in types.Hope this makes sense.
Btw. you're welcome to start a new thread, if you have more specific questions regarding this.
sorry sune i didn't get what you say, will you please explain it more. below is the my xml code
<container name="External database" connection="data source=Test;database=Test;user id=test;password=test">
<primaryKey name="reviewID" />
<view name="Reviews entries" pageSize="50" >
<column field="DateAdded" title="Date Added" />
<column field="Rating" />
<column field="Title" />
<column field="Description" />
<column field="IsApproved" title="Is Approved"/>
SELECT reviewID, DateAdded, Rating, Title, Description, IsApproved
<field title="ID" sourceField="reviewID" umbracoDataType="Textstring" readonly="true" />
<field title="Title" sourceField="Title" umbracoDataType="Textstring" />
All i need is to edit this record. :(
Btw what do you mean by yourowntype and yourownassembly. What are the built in types that I should inherit from?
how listControldatasouce will work for umbraco7.2.x
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted