I have some tables in SQL Server, which I will like to use as lookups
from sharepoint.
I am exposing the SQL Server tables to Sharepoint using Frontpage 2003
DataView feature (which by the way is sooo sweet!).
The problem I have is that the Dataviews on a sharepoint page are not
exposed to Sharepoint lists...i.e. I cannot add a new Lookup column to
say a Custom List, and have it reference a column in a dataview...since
the Dataview is not exposed at that level.

Example: I would like to have a Calendar and a Document Library where
each entry is linked to a "Customer" record stored in a separate SQL
Server or Access table. If the Customer record was a Sharepoint custom
list then the solution will be easy since you can just add a Lookup
field that reference list.

I assume that the solution will be to expose those SQL tables to
sharepoint through a Frontpage Dataview. The question is how do I
allow entries to be saved such as document library and calendar entries
to be added with columns referencing SQL table columns.

Re: How do I tie Sharepoint lists/document libraries/events/etc to a DataView column by Mike

Mike
Sun Jan 16 23:27:18 CST 2005

If you want to do this by programming - ask in the sub newsgroup for WSS
programming microsoft.public.sharepoint.windowsservices.development

If you want to do something like it with data view, consider starting again
and instead of Lookup consider using Web Part Connections on your page to
connect a value in one list with the web part containing data from your SQL
Server table.

Mike Walsh, Helsinki, Finland
WSS FAQ at http://wss.collutions.com
Please post questions to the newsgroup only.


"Bunmi" <olubunmi@gmail.com> wrote in message
news:1105918222.368983.257710@f14g2000cwb.googlegroups.com...
> I have some tables in SQL Server, which I will like to use as lookups
> from sharepoint.
> I am exposing the SQL Server tables to Sharepoint using Frontpage 2003
> DataView feature (which by the way is sooo sweet!).
> The problem I have is that the Dataviews on a sharepoint page are not
> exposed to Sharepoint lists...i.e. I cannot add a new Lookup column to
> say a Custom List, and have it reference a column in a dataview...since
> the Dataview is not exposed at that level.
>
> Example: I would like to have a Calendar and a Document Library where
> each entry is linked to a "Customer" record stored in a separate SQL
> Server or Access table. If the Customer record was a Sharepoint custom
> list then the solution will be easy since you can just add a Lookup
> field that reference list.
>
> I assume that the solution will be to expose those SQL tables to
> sharepoint through a Frontpage Dataview. The question is how do I
> allow entries to be saved such as document library and calendar entries
> to be added with columns referencing SQL table columns.
>



Re: How do I tie Sharepoint lists/document libraries/events/etc to a DataView column by Bunmi

Bunmi
Tue Jan 18 20:50:16 CST 2005

Thanks for the quick response.

My first choice is to avoid programming, if I can.

You suggested using web part connections to connect the value of one
list with a dataview. But I'm not sure that this will work - but I
could be wrong. My assumption is webpart connection only allows you to
"Filter/provide data to" another dataview/webpart. What I'm mainly
trying to do is to be able to "Insert" new items into a Sharepoint list
(Calendar/Announcements/Custom list), where these new items are related
to an entity (such as Customer) stored in SQL Server.

I looked into using the web part connection to make the dataview
provide data values to the NewForm.aspx for that list, but that doesn't
seem to work, since the NewForm.aspx doesn't expose the connections.

I'm afraid that even if the connection method wants, i won't be able to
have selectable dropdowns similar to a "lookup" type field in a
sharepoint list. Which is the effect I'm trying to reproduce with
Dataviews.
Luckily this is a proof of concept project so I'm just trying to find
the right way, before beginning designing...

thanks all!!

Mike Walsh wrote:
> If you want to do this by programming - ask in the sub newsgroup for
WSS
> programming microsoft.public.sharepoint.windowsservices.development
>
> If you want to do something like it with data view, consider starting
again
> and instead of Lookup consider using Web Part Connections on your
page to
> connect a value in one list with the web part containing data from
your SQL
> Server table.
>
> Mike Walsh, Helsinki, Finland
> WSS FAQ at http://wss.collutions.com
> Please post questions to the newsgroup only.
>
>
> "Bunmi" <olubunmi@gmail.com> wrote in message
> news:1105918222.368983.257710@f14g2000cwb.googlegroups.com...
> > I have some tables in SQL Server, which I will like to use as
lookups
> > from sharepoint.
> > I am exposing the SQL Server tables to Sharepoint using Frontpage
2003
> > DataView feature (which by the way is sooo sweet!).
> > The problem I have is that the Dataviews on a sharepoint page are
not
> > exposed to Sharepoint lists...i.e. I cannot add a new Lookup column
to
> > say a Custom List, and have it reference a column in a
dataview...since
> > the Dataview is not exposed at that level.
> >
> > Example: I would like to have a Calendar and a Document Library
where
> > each entry is linked to a "Customer" record stored in a separate
SQL
> > Server or Access table. If the Customer record was a Sharepoint
custom
> > list then the solution will be easy since you can just add a Lookup
> > field that reference list.
> >
> > I assume that the solution will be to expose those SQL tables to
> > sharepoint through a Frontpage Dataview. The question is how do I
> > allow entries to be saved such as document library and calendar
entries
> > to be added with columns referencing SQL table columns.
> >


Re: How do I tie Sharepoint lists/document libraries/events/etc to a DataView column by Mike

Mike
Wed Jan 19 00:45:54 CST 2005

>You suggested using web part connections to connect the >value of one list
with a dataview. But I'm not sure that >this will work - but I could be
wrong.

You *can* connect a list value with data from a dataview of a database. The
key thing is that the field you are using for the link has to be present in
the list of fields chosen for output (even if they are not output! - you'll
see what I mean when you try this) by the dataview.

(I think I wrote a WSS FAQ item on one way to amend the code in the file
produced by dataview from a database so that you rather than the system can
decide which files are visible and in which order)

The other questions I'll leave to someone else. (Work calls)

Mike Walsh, Helsinki, Finland
WSS FAQ at http://wss.collutions.com
Please post questions to the newsgroup only.


"Bunmi" <olubunmi@gmail.com> wrote in message
news:1106103016.668751.214900@c13g2000cwb.googlegroups.com...
> Thanks for the quick response.
>
> My first choice is to avoid programming, if I can.
>
> You suggested using web part connections to connect the value of one
> list with a dataview. But I'm not sure that this will work - but I
> could be wrong. My assumption is webpart connection only allows you to
> "Filter/provide data to" another dataview/webpart. What I'm mainly
> trying to do is to be able to "Insert" new items into a Sharepoint list
> (Calendar/Announcements/Custom list), where these new items are related
> to an entity (such as Customer) stored in SQL Server.
>
> I looked into using the web part connection to make the dataview
> provide data values to the NewForm.aspx for that list, but that doesn't
> seem to work, since the NewForm.aspx doesn't expose the connections.
>
> I'm afraid that even if the connection method wants, i won't be able to
> have selectable dropdowns similar to a "lookup" type field in a
> sharepoint list. Which is the effect I'm trying to reproduce with
> Dataviews.
> Luckily this is a proof of concept project so I'm just trying to find
> the right way, before beginning designing...
>
> thanks all!!
>
> Mike Walsh wrote:
> > If you want to do this by programming - ask in the sub newsgroup for
> WSS
> > programming microsoft.public.sharepoint.windowsservices.development
> >
> > If you want to do something like it with data view, consider starting
> again
> > and instead of Lookup consider using Web Part Connections on your
> page to
> > connect a value in one list with the web part containing data from
> your SQL
> > Server table.
> >
> > Mike Walsh, Helsinki, Finland
> > WSS FAQ at http://wss.collutions.com
> > Please post questions to the newsgroup only.
> >
> >
> > "Bunmi" <olubunmi@gmail.com> wrote in message
> > news:1105918222.368983.257710@f14g2000cwb.googlegroups.com...
> > > I have some tables in SQL Server, which I will like to use as
> lookups
> > > from sharepoint.
> > > I am exposing the SQL Server tables to Sharepoint using Frontpage
> 2003
> > > DataView feature (which by the way is sooo sweet!).
> > > The problem I have is that the Dataviews on a sharepoint page are
> not
> > > exposed to Sharepoint lists...i.e. I cannot add a new Lookup column
> to
> > > say a Custom List, and have it reference a column in a
> dataview...since
> > > the Dataview is not exposed at that level.
> > >
> > > Example: I would like to have a Calendar and a Document Library
> where
> > > each entry is linked to a "Customer" record stored in a separate
> SQL
> > > Server or Access table. If the Customer record was a Sharepoint
> custom
> > > list then the solution will be easy since you can just add a Lookup
> > > field that reference list.
> > >
> > > I assume that the solution will be to expose those SQL tables to
> > > sharepoint through a Frontpage Dataview. The question is how do I
> > > allow entries to be saved such as document library and calendar
> entries
> > > to be added with columns referencing SQL table columns.
> > >
>



Re: How do I tie Sharepoint lists/document libraries/events/etc to a DataView column by Bunmi

Bunmi
Wed Jan 19 14:02:08 CST 2005

Thanks a lot for the quick response Mike. !

I think your suggestion will solve all my "viewing problems"...but not
my "Insert problems", i.e. inserting data into sharepoint lists that
are related to sql server table rows.
I'm thinking the only way (aside from custom web parts) to build Insert
support, is to modify the NewForm.aspx (New Item) page...and provide
the DataView data to the necessary fields on that page. Unfortunately,
the webpart on the NewForm.aspx does not support web connections.

Has anyone had success passing list to a dropdown on the NewForm.aspx
page?

I have seen some posts on some javascript that I can use to set the
default selected item, by passing URL parameters to the NewForm.aspx
page, so all I need now is to be able to load the lists in dropdowns on
NewPage.aspx.