Products

Solutions

Resources

Partners

Community

About

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsMapMapCustom Queries: A question about the data layoutCustom Queries: A question about the data layout
Previous
 
Next
New Post
4/8/2009 10:42 AM
 

After spending some time trying to make a custom query work, I'd like to check if anyone can answer a question for me please!

First, some background.

As I can't rely on the Find Address functionality actually returning correct Lat and Long coordinates for Sweden (they're nearly right, but at the street level I need them to be exactly right!) I decided to adopt the following strategy:

  • Add some custom fields to the User Profile including Lat, Long, Icon and a DisplayOnMap attribute.
  • Write a stored procedure to "flatten" all of the User Properties into a Temporary Table via a Stored Procedure
  • Have that stored procedure then return all of the User Data in the correct format that corresponds to the Map_Points table.

I know that my stored procedure is working as I am returning data with the same column values and column names as per data already existing on the Map_Points table on my db. The problem is that having changed to "Custom Query" in my map config, if I use the query "SELECT * FROM Map_Points" (with no connection string as my data is local) I get back the expected data correctly formatted.

If I replace the Query with a call to my Stored Procedure, I get no data on the map. Remember, I am certain that the column names and data returned are the same as the Map_Points table.

My questions therefore is:

The temp table in my stored procedure is simply a flat representation of the User Profile Data, it is not a table that matches the Map_Points table. I run a SELECT statement against this temp table and reformat the output  to match the column names on the Map_Points table. Is this the problem? Does the result set returned have to match the column datatypes as well as the column names? If this is the case I'll have to rework the stored procedure to actually generate the temp table in exactly the same form as the Map_Points table, but your answers may save me a ton of work on this which is why I haven't done it yet ;o)

As always, looking forward to any help you folks can provide.

Regards, Sean

 


Regards,
Sean

www.puffettfoto.com
 
New Post
4/8/2009 1:38 PM
 

Sorry folks, I can't delete this thread to save you the time of reading it, but I've solved my own problem!!

The answer I was looking for is that you can simply reform the data without having to match the column datatypes exactly. The data has to be able to cast to the same datatype as on the Map_Points table, but doesn't need to originate from a copy of that table. I hope that makes sense.

Basically, to prove this I generated a SELECT statement in the "Custom Query" window which just created the data in the right format wihout retrieving the data from a table and this generated points on my map.

The real problem in my case was that I was using an IconIndex for an Icon that I had previously deleted. This causes the Google Map to be unable to render the point(s), leaving me with a "Plotting Points..." message at the bottom of the map.

Phew, a whole day's work, but I've finally got my map points rendering automatically from data stored in the User Profile instead of having to rely on the Users Online functionality which was hit and miss (geographically speaking!).

Regards, Sean


Regards,
Sean

www.puffettfoto.com
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsMapMapCustom Queries: A question about the data layoutCustom Queries: A question about the data layout


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out