Home Search Member List Faq Register Login  
UltimateSitemap
Re: Problem loading sitemap from database

Thread Starter: mark1   Started: 10-21-2004 3:43 PM   Replies: 1
 Karamasoft Support Forums » General Discussions » UltimateSitemap » Re: Problem loading sitemap from database
 Printable Version    « Previous Thread   Next Thread »
  21 Oct 2004, 3:43 PM
mark1 is not online. Last active: 10/21/2004 3:43:04 PM mark1

Not Ranked
Joined on 10-21-2004
Posts 1
Problem loading sitemap from database
I have downloaded the trial version of sitemap, but i am unable to get the load from the database to work.

I have used the provided SQL script to create the database table and have loaded four records with a sitemapid of "Sitemap1".

Following the directions from the provided tutorial I have the following in my page load: 

Dim cnExchange As New SqlConnection(ConfigurationSettings.AppSettings("connectionString"))

Dim sitemapId As String = "Sitemap1"

FoldersTreeView.DatabaseConnStr = cnExchange.ConnectionString

FoldersTreeView.DatabaseSitemapID = sitemapId

(FoldersTreeView is the id of my control in my aspx page)

I have used debug to check that the connection string is being picked up correctly from my webconfig file, and it is.

But when i go to the page I am getting a "Sitemap source XML cannot be loaded" message.

Anyone any ideas?


  
  22 Oct 2004, 3:08 PM
Karamasoft is not online. Last active: 5/8/2018 10:36:45 AM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,820
Re: Problem loading sitemap from database

You have to provide a data provider such as "Provider=SQLOLEDB;" in your connection string. SqlConnection doesn't allow you to use a provider in the connection string, but the server control expects one since it relies on a generic OleDb connection rather than a specific SqlConnection.

Therefore you should change your code as:

Dim cnExchange As New OleDb.OleDbConnection(ConfigurationSettings.AppSettings("connectionString"))

and set a provider in your connection string in the web.config file as:

<add key="connectionString" value="Provider=SQLOLEDB;User ID=sa;Password=sa;Initial Catalog=YourDatabaseName;Data Source=YourServerName;" />


  
 Page 1 of 1 (2 items)
Karamasoft Support Forums » General Discussions » UltimateSitemap » Re: Problem loading sitemap from database

You can add attachments
You can post new topics
You can reply to topics
You can delete your posts
You can edit your posts
You can create polls
You can vote in polls
Forum statistics are enabled
Forum is unmoderated

© 2002-2018 Karamasoft LLC. All rights reserved.